The announcement came during a parliamentary hearing to impeach him, following a military takeover last week.
A letter submitted to parliament by the 93-year-old said his decision to resign was voluntary on his part.
Wild jubilation broke out among MPs when Jacob Mudenda, the speaker, told the parliament.
Impeachment proceedings against Mugabe began earlier on Tuesday as the ruling party, Zanu-PF, attempted to remove him from office.
Thousands of Zimbabweans had also turned up outside parliament to urge on MPs, chanting, dancing and waving placards in Africa Unity square
Shortly before legislators met, the man expected to succeed him broke more than a week of silence to add his voice to those calling for the ageing leader to step down.
Emmerson Mnangagwa, until recently Mugabe’s vice-president and right hand man, urged the nonagenarian leader to “accept the will of the people”.
Mugabe has been under house arrest and key allies of his wife, Grace, removed from power since the military took charge last week.
The ruling Zanu-PF party, which at the weekend voted to make Mnangagwa its leader and demote Mugabe to a rank-and-file member, introduced the motion to impeach and the opposition seconded it.
Mugabe had refused to resign until the impeachment proceedings were underway.
Mnangagwa, who is now set to become president, had said in a written statement released on Tuesday morning that he backed impeachment as an “ultimate expression of the will of the people outside an election.”
He had fled into exile earlier this month after being ousted from his position in government and Zanu-PF by a faction allied to Grace Mugabe. His supporters are widely believed to be behind the coup. End