The surprise announcement halted an impeachment hearing against him that had commenced.
Lawmakers roared in jubilation and people have begun celebrating in the streets.
A letter from Mr Mugabe said that the decision was voluntary and that he had made it to allow a smooth transfer of power, the Reuters news agency reports.
Mr Mugabe had previously refused to resign despite last week’s military takeover and days of protests.
Mugabe, 93, has been in power since his country’s independence in 1980.