"The speaker will take over my responsibility."
The government has failed to restore security to Somalia, which has been without an effective central government since 1991.
"Most of the country was not in our hands and we had nothing to give our soldiers. The international community has also failed to help us," Yusuf told parliament in his resignation speech.
In 2006, the government had to ask for help from neighbouring Ethiopia to force out the Islamic Courts Union, an alliance of armed opposition groups which had seized control of most of central and southern Somalia.
Groups that alliance have grown in strength in recent months taking back many of the areas they were pushed out of in late 2006, and the government now controls only small pockets of the country and areas of the capital Mogadishu.
Hussein has welcomed talks with the various opposition factions and backed a peace deal signed with some former members of Islamic Courts. Yusuf had been largely dismissive of the deal.
Some analysts have suggested that Yusuf's resignation could create a political vaccuum and further destabilise the security situation as Ethiopian troops prepare to leave.
Aden Mohamed Nur, the parliamentary speaker, called for political unity after the resignation.
"I have received and accepted the resignation letter of President Abdullahi Yusuf Ahmed," he said.
"I congratulate the president for the bold step he has taken in respect of the transitional federal charter."
Hussein was appointed in November 2007 after his predecessor, Ali Mohamed Gedi, was also forced to resign amid a bruising power struggle with Yusuf.