The move looks set to end Zimbabwe’s worst political crisis since it won independence from Britain in 1980.
The bombshell announcement came at a special joint session of parliament convened to impeach Mugabe, 93, who has dominated every aspect of Zimbabwean public life for decades.
On the streets, the news sparked wild celebrations, with car horns being honked and people erupting into ecstatic cheers and frenzied dancing.
The letter that ended Mugabe’s tumultuous tenure was read out not by the man himself but by parliamentary speaker Jacob Mudenda.
"I, Robert Gabriel Mugabe... hereby formally tender my resignation... with immediate effect," it said.
"My decision to resign is voluntary on my part," he said, speaking of his "concern for the welfare of the people of Zimbabwe and my desire to ensure a smooth, peaceful and non-violent transfer of power".
In a highly symbolic scene, a man removed a portrait of Mugabe from a conference room where MPs had gathered.
Another bystander replaced it with an image of former vice president Emmerson Mnangagwa, Mugabe’s fired deputy. He was once a key Mugabe ally who had been Grace Mugabe’s chief rival to succeed him and his dismissal on November 6 triggered the crisis.
The ruling ZANU-PF party indicated Mnangagwa could swiftly be named interim president as the country charts a way through the turbulence.
"Mnangagwa... will come back in the next 24 hours or so and he will be the one who will be sworn in to be president for 90 days," said party spokesman Simon Khaya Moyo on Tuesday.
Outside the building used for the impeachment hearing, a man held up a smiling new-born baby dressed in white, drawing rapturous cheers from the crowd.
It capped an unprecedented week in which the military seized control and tens of thousands of ordinary Zimbabweans took to the streets in an extraordinary show of defiance to demand that Mugabe leave.
’I’m so happy!’
"I am so happy that Mugabe is gone, 37 years under dictatorship is not a joke. I am hoping for a new Zimbabwe ruled by the people," Tinashe Chakanetsa, 18, said.
Men were breakdancing, women were singing and children were in tears as the news began to sink in, brandishing national flags and praising army chief General Constantino Chiwenga who led the military’s power-grab.
"It’s shocking, that guy is powerful, very powerful," said barber Wright Chirombe who was also taking part in the euphoric celebrations.
Mugabe had ruled Zimbabwe almost unopposed since independence -- but efforts to position his wife Grace as his successor triggered fury in the military that had underpinned his regime.
His monolithic grip was shattered last week when armoured military vehicles took to the streets, blockaded parliament and soldiers placed the president under house arrest -- an operation that had all the hallmarks of a coup.
But the generals stopped short of forcing out Mugabe.
As the crisis grew, the ruling ZANU-PF party, an instrument of Mugabe’s ruthless decades-long rule, removed him as party leader and began parliamentary proceedings to have him impeached.
"Mugabe might have been hoping that the impeachment process would not succeed, that it might stumble in getting the numbers together," said Innocent Gonese, chief whip of the main opposition Movement for Democratic Change party.
But it was quickly obvious that things had gone beyond that.
"When he saw the turnout (of lawmakers), he probably realised he’d better jump before he was pushed," said Derek Matyszak, an analyst at the Pretoria-based Institute for Security Studies.
Following Mugabe’s stunning departure, army chief Chiwenga called for Zimbabweans to "exercise maximum restraint and observe law and order to the fullest."
Mnangagwa in the wings
Analysts agree that Mnangagwa is Mugabe’s most likely successor -- and Grace has not been seen since the start of the crisis.
However, under Zimbabwe’s constitution, it is second Vice President Phelekezela Mphoko who would ordinarily take over as head of state.
"I think we’re going to see Emmerson Mnangagwa sworn in very quickly... As far as I understand Mphoko is not in the country. Then the cabinet should meet if there’s no president or vice president and appoint one," said Matyszak.
Gonese agreed, suggesting that the ruling party could appoint a successor in "less than two hours".
The European Union’s diplomatic chief Federica Mogherini called for a solution that "respects the aspirations of the people of Zimbabwe for a more prosperous and democratic future".
British Prime Minister Theresa May said the resignation gave Zimbabwe "an opportunity to forge a new path free of the oppression that characterised (Mugabe’s) rule".
Most Zimbabweans have only known life under Mugabe, a time defined by violent suppression, economic collapse and an ever greater distance from the world’s leading states.
A US State Department spokeswoman said there was "a historic opportunity, a historic moment" for the people to put an end to" Zimbabwe’s isolation. Source from VNS.