In a brief televised speech on Monday, Prime Minister Hassan Diab said he was taking "a step back" so that he can stand with the Lebanese people "and fight the battle for change alongside them."
"I declare today the resignation of this government. May God protect Lebanon,'' Diab said.
"Today we are heeding the people and their demands to hold accountable those responsible for a disaster," Diab added.
Diab blamed his predecessors for last week's deadly blast in the capital, Beirut. "They should have been ashamed of themselves because their corruption is what has led to this disaster that had been hidden for seven years," Diab said.
"Their corruption created this tragedy," Diab added. "Between us and change stands a thick wall protected by their dirty tactics," he said.
President Michel Aoun accepted the resignation of the government.
Earlier on Monday, Health Minister Hamad Hassan told reporters that Diab was heading to the presidential palace to "hand over the resignation in the name of all the ministers.''
"The whole government resigned," Hassan said.
The Lebanese government on Monday held a cabinet meeting amid mounting pressure to step down over the devastating explosion that killed more than 150 people in Beirut earlier this week.
'Aspirations of the Lebanese people'
Meanwhile, France has urged the "rapid formation" of a new government in Lebanon.
"The aspirations expressed by the Lebanese in terms of reforms and governance must be heard," French Foreign Minister Jean-Yves Le Drian said in a statement following Diab's announcement.
"The priority must be the rapid formation of a government that can live up to the expectations of the people, whose mission will be to meet the main challenges of the country, especially the reconstruction of Beirut and reforms without which the country will plunge into economic, social and political chaos," he said.
French President Emmanuel Macron was the first Western leader to visit Beirut on Thursday, just days after the deadly explosion.
Ministers step down amid growing public anger
Protesters and critics of the government have blamed corruption and poor leadership at the heart of Lebanon's government for the explosion.
At least nine members of parliament have resigned since the blasts with many more ministers wanting to resign, Reuters reported citing ministerial and political sources.
The cabinet was formed in January with the support of the Iran-backed Hezbollah group and its allies.
Hours after the first protests rocked Beirut over the weekend, Prime Minister Diab vowed to hold early parliamentary elections as his embattled government faces calls to resign.
Diab said he would stay in government for another two months until major parties can reach an agreement.
About 20 people have been detained over the explosion, including the head of Lebanon's customs department and his predecessor, and the chief of the port. Dozens more have been questioned, including two former Cabinet ministers, according to government officials.
The investigations is focusing on how 2,750 tons of the extremely explosive ammonium nitrate chemical came to be stored at a warehouse in Beirut's port for six years.
Protests grip Beirut
Protesters clashed with riot police in Beirut and tried to break into a cordoned-off area at the parliament square on Sunday amid widespread anger over the massive explosion that killed at least 158 people earlier this week.
A fire broke out at the entrance to the square near the parliament building, according to footage shown by Lebanese television. Police fired tear gas to disperse the crowd.
shs,mvb/rc (AFP, Reuters, dpa)