The announcement came minutes into a joint session of the Zimbabwean Parliament in Harare, convened to prise Mugabe from power.
As the Speaker read out a letter from Mugabe, lawmakers broke out in thunderous applause and cheers.
In the streets outside, crowds broke out in rapturous celebrations, dancing and cheering in joy, some raising their fists and waving Zimbabwean flags.
Mugabe’s resignation marks the end of an era in Zimbabwe. He ruled the country with an iron fist for almost four decades and is the only leader the nation has known since it achieved independence from Britain in 1980.
Mugabe’s political demise is the consequence of a struggle over who would succeed him in the ZANU-PF, a party split between those loyal to the former vice president, Emmerson Mnangagwa, and supporters of Mugabe’s wife, Grace Mugabe.
It was a humiliating departure for Mugabe, who clung onto power for a week but eventually buckled to pressure.
The party he co-founded to usher the country into independence ousted him, the military that he commanded placed him under house arrest and his most powerful allies abandoned him.
Mugabe rose to power as a freedom fighter and was once regarded as Zimbabwe’s own Nelson Mandela, but he quickly waged a campaign of oppression to shore up his authority, extinguishing the political opposition through violent crackdowns.
Mugabe’s hardline policies also pushed the country into poverty. Its flourishing economy began to disintegrate after a program of land seizures from white farmers, and agricultural output plummeted and inflation soared.
Over the decades, Mugabe and his wife face fierce criticism for leading lavish lifestyles as the country was plunged into economic ruin.