The Sunni politician addressed the nation in a televised address after a mob loyal to Shi'ite Muslim groups Hezbollah and Amal attacked and destroyed a protest camp set up by anti-government demonstrators in Beirut.
Lebanon has been paralysed by the unprecedented wave of protests against the rampant corruption of the political class that has collectively led Lebanon into the worst economic crisis since the 1975-90 civil war.
"For 13 days the Lebanese people have waited for a decision for a political solution that stops the deterioration (of the economy) and I have tried, during this period, to find a way out, through which to listen to the voice of the people," Hariri said in his speech.
"It is time for us to have a big shock to face the crisis. I am going to the Baabda (presidential) palace to present the resignation of the government. To all partners in political life, our responsibility today is how we protect Lebanon and revive its economy".
In central Beirut, black-clad men wielding sticks and pipes wrecked the protest camp that has been the focal point of countrywide rallies against the long entrenched elite.
The turmoil has worsened Lebanon's acute economic crisis, with financial strains leading to a scarcity of hard currency and a weakening of the pegged Lebanese pound. Lebanese government bonds tumbled on the turmoil.
It is the most serious strife on the streets of Beirut since 2008, when Hezbollah fighters seized control of the capital in a brief eruption of armed conflict with Lebanese adversaries loyal to Hariri.