"I hope the nation and the people will forgive my mistakes," Musharraf said.
It was not immediately clear whether Musharraf would stay in Pakistan. He said his fate was in the hands of the Pakistani people.
Musharraf dominated Pakistan for years after seizing power in a 1999 military coup, making the country a key strategic ally of the U.S. by supporting the war on terror. But his popularity at home sank over the years.
Many Pakistanis blame rising violence in their country on Musharraf's alliance with the U.S. His reputation took a hit in 2007 when he ousted dozens of judges and imposed emergency rule.
His rivals won February parliamentary elections and Musharraf has been largely sidelined since his rivals came to power.
The president had resisted mounting calls to resign in recent days, even as the coalition said it had finalized impeachment charges against him and could send a motion to Parliament later this week.
In announcing he would quit after all, Musharraf said many problems face Pakistan, including its sinking economy. "I pray the government stops this down-sliding and take the country out of this crisis," he said.
Allies and rivals of the president said talks had been under way to get him to step down by possibly granting him legal immunity from future prosecution. The status of those talks was not immediately clear Monday afternoon.
With Musharraf's utility fading, the West appeared to be concerned less with his fate than about how the clamor was affecting the halting efforts of the new civilian government against terrorism and the gathering economic woes.
A U.S. embassy spokesman declined to comment after Musharraf's speech, referring calls to Washington. Secretary of State Condoleezza Rice said Sunday the Pakistani president's future was an internal issue.
While Musharraf was a "good ally" who "kept his word" on ending military rule, whether he should resign "is a matter for Pakistan to determine," she said.
RSS feeds | Slideshow archive | ABC13 wireless | Help solve crimes