President Michel Martelly had earlier warned he would not step aside without an established succession plan, enraging protesters who have marched almost daily in the capital Port-au-Prince over the past two weeks.
Haiti's constitution requires Martelly to leave office on Feb. 7, but runoff elections to choose the next president were canceled last month when opposition candidate Jude Celestin threatened to boycott the vote and protests turned violent.
"I am grateful to all those who allowed me to serve. On Feb. 7, I'll leave without any regret, any envy and without any desire to remain in power," Martelly told reporters at an event to inaugurate a new Department of Interior headquarters built after a January 2010 earthquake flattened much of the capital.
Martelly's departure should placate opposition parties who accuse him of trying to unfairly favor his preferred candidate, Jovenel Moise, in the elections but could leave a power vacuum in the poor, volatile Caribbean nation.
Martelly denies any wrongdoing. An official, independent evaluation of the election found the first round of voting was flawed, and questioned the registration of more than 900,000 party agents who were able to vote at any polling station.
A short distance across town from Martelly, more than two thousand anti-government protesters marched outside parliament, with some demanding that former President Jean-Bertrand Aristide, ousted in a 2004 coup, be called to head an interim government.
"Aristide is the right man to deal with the current situation because he is a man of consensus, he is the most popular personality in Haiti, said Gerald Gilles, a former senator and spokesman for Aristide's party.
That solution is unlikely to appeal to Celestin and other opposition candidates, who want a Supreme Court judge to lead an interim government that would more deeply investigate the first round and organize a new election.
Protesters clashed with police. Some threw rocks at parliament, where lawmakers met in a joint session of the 50th legislature.
"The National Assembly will take all necessary measures to fill the vacancy of the presidency," said Jocelerme Privert, president of the Senate, in a short speech.
A mission from the Organization of American States is trying to broker a solution.