Cars blasted their horns in the capital Harare as thousands jubilantly poured onto the streets to celebrate the termination of his presidency.
Some carried signs with pictures of Army Chief Chiwenga and ousted Vice President Mnangagwa as they amassed in the city centre.
In his letter of resignation, he said: “I Robert Gabriel Mugabe hereby formally tender my resignation as President of Zimbabwe with immediate effect.
“My decision to resign is voluntary on my part
He added he had resigned to “allow smooth transfer of power”.
The coup came soon after Mugabe sacked his Vice President Emmerson Mnangagwa, also known as ‘The Crocodile’, who had been engaged in a succession battle with his wife Grace Mugabe.
Mr Mnangagwa, who is now the frontrunner to take over from his former ally after taking over the leadership of Zanu-PF, has said that he plans to return to Zimbabwe from political exile abroad.
The party’s chief whip Lovemore Matuke said he was “very happy” Mugabe chose to step down of his own accord, adding the process could have ended in “serious embarrassment”.
Mugabe has been in power since the country announced its independence in 1980, and has been accused of using violent torture to silence his opponents.
Human rights groups say 20,000 people died, mostly from the tribe of opponent Nkomo’s Ndebele.
Mass graves were discovered shortly after, prompting accusations of genocide against Mugabe.
The highly educated autocrat once boasted he had “a degree in violence” after crushing political dissent in the country.
And earlier this week he was accused by UK officials of guiding the country into an “unprecedented economic tailspin” over the last 15 years.
The decision was welcomed by Prime Minister Theresa May, who said it gave the nation a new opportunity to strike free from the autocrat’s regime.
In a statement she said: “The resignation of Robert Mugabe provides Zimbabwe with an opportunity to forge a new path free of the oppression that characterised his rule.
“In recent days we have seen the desire of the Zimbabwean people for free and fair elections and the opportunity to rebuild the country’s economy under a legitimate government.
“As Zimbabwe’s oldest friend we will do all we can to support this, working with our international and regional partners to help the country achieve the brighter future it deserves.”
A spokesman for the Prime Minister added: ”We felt Mugabe had lost the support of people of Zimbabwe.
“This could provide an opportunity to move forwards.”
His resignation follows pressure from both within Mugabe’s regime and from international powers.
Last week Foreign Secretary Boris Johnson tweeted: “UK and South Africa agree Zimbabweans must be able to decide their own future in free and fair elections in line with constitution.
“Authoritarian rule should have no place in Africa.”