But the BBC's Central Europe correspondent Nick Thorpe says that the clashes on Tuesday were the last straw for Mr Borisov.
Many Bulgarians remain deeply unhappy over high energy costs, power monopolies, low living standards and corruption.
'We did our best'
Parliament will vote on the resignation on Thursday. If it is accepted, President Rosen Plevneliev, a political ally of the prime minister, will have to appoint an interim government to rule until the next parliamentary elections., our correspondent says.
It was not immediately clear whether or not a parliamentary election scheduled for July would now be brought forward.
"Our power was handed to us by the people, today we are handing it back to them," Mr Borisov said.
"I cannot stand looking at a bloody Eagles' Bridge," he added, referring to a busy intersection in the centre of Sofia that became the centre point of clashes between police and protesters on Tuesday.
"We did our best over these four years."
Many of the protesters in Sofia and other major Bulgarian cities had demanded the resignation of the centre-right GERB party government and the re-nationalisation of power distributors.
The government lost support after it abandoned plans in March 2012 to build a new nuclear power station at Belene, close to the Romanian border.