Mr Mugabe, Mr Tsvangirai and Arthur Mutambara - leader of a breakaway faction of Mr Tsvangirai's Movement for Democratic Change (MDC) - signed the agreement in front of some 3,000 invited guests in Harare's International Conference Centre.
The signatories were introduced in the terms used in the agreement - Mr Mugabe as president and Mr Tsvangirai as prime minister.
To rapturous applause, the leaders shook hands after exchanging signed copies.
Mr Mugabe accused the former colonial power - the UK - of meddling in his country's affairs by calling for a "regime change" and by imposing sanctions.
I've signed this agreement because I believe it represents the best opportunity for us to build a peaceful and prosperous democratic Zimbabwe
The BBC's Adam Mynott says the eyes of Zimbabwe's neighbours, Africa and the whole world will be fixed now on seeing whether this deal does result in a genuine sharing of executive authority.
Negotiations started at the end of July, with a breakthrough coming late on Thursday after negotiations mediated by South African President Thabo Mbeki.
Speaking after the accord was signed on Monday, Mr Mbeki warned that the make-up unity government had yet to be finalised.
"Some discussions have already started about the constitution of this inclusive government, [but] they have not yet concluded," he said. "I am confident that they will do so as soon as possible."
While welcoming the deal as a "great day" for both Africa and the world, African Union chairman Jakaya Kikwete also noted that doubts remained over how long it would last.
"Will it hold or will it not? That is the question," he said.
Some MDC members have called the power-sharing deal a climb-down, although others have said it is the best available.
'A new page'
The deal opens the way for international donors to help to revive Zimbabwe's economy, where inflation is at more than 11,000,000%.
The International Monetary Fund, which suspended financial and technical assistance in 2006, said it stood ready for talks with the new government about its policies to stabilise the economy, improve social conditions, and reduce poverty.
EU foreign policy chief Javier Solana said a decision on lifting sanctions on Zimbabwean officials had been postponed until October.
Some MDC supporters are celebrating - others remain wary
Mr Solana said the EU needed to study the details of the agreement but that he expected it to open "a new page" for Zimbabwe.
The US government expressed cautious optimism about the deal, but stressed that it was "anxious" to see the full details.
"Our number one priority is that you have a legitimate government in Zimbabwe that represents the will of the people," said White House spokesman Gordon Johndroe.
The UK Foreign Secretary, David Miliband, said it would want to see the administration make significant progress before it considered lifting sanctions.
Mr Mugabe, in power since independence from Britain in 1980, won a controversial presidential run-off election in June.
He ran unopposed after Mr Tsvangirai withdrew, claiming the MDC was the target of state-sponsored violence.
In the first round of the presidential election in March, Mr Tsvangirai gained more votes than Mr Mugabe but official results say he did not pass the 50% threshold for outright victory.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.