Morgan Tsvangirai, the MDC leader, said: "It is a very historic occasion ... and I want to thank president [Mbeki] for the facilitation of this process.
"As we sign the memorandum of understanding, we all commit ourselves for a solution and I want to thank everyone who has made a contribution to ensure the process of negotiations becomes successful," he said
"But as we move towards these negotiations, I hope that all of us must bear in mind the mother and the child who go to sleep without food, the people who have been brutalised, the divisions and bitter exchanges and I sincerely acknowledge that if we put our heads together, we can find a solution."
Mugabe, who earned international condemnation for pursuing a "one-man" election in June, said the agreement would help "chart a new way".
"This is out of a decision that we made sometime ago that we assist each other to overcome the political and economic situation which requires support," he said.
South African mediation
Mbeki, who has in the past been criticised for his "quiet diplomacy" towards Mugabe, travelled to Harare to be present for the signing.
The deal, which South African's foreign ministry said "represents a positive step forward", comes after a series of meetings he held with the rival parties and officials from the UN and the African Union.
But Mugabe's critics continued to hit out at his party.
"I would question why we need Zanu-PF in any new government - it's not as if they have shown they can govern effectively," Georgina Godwin, a Zimbabwean journalist speaking to Al Jazeera from London, said.
"What Zimbabweans really need is a free and fair election," she said.
International pressure for Zanu-PF and the MDC to negotiate intensified after Mugabe's victory in the presidential run-off election, that was boycotted by Tsvangirai over a wave of attacks against his supporters.
The MDC says that at least 120 people have been killed in politically motivated violence.
Tsvangirai had previously refused to negotiate with Mugabe unless he and Zanu-PF recognised his victory in the first round of the presidential poll on March 29.
Tsvangirai had won the March election, but failed to achieve a majority.