The Transport Secretary insists the Government "will not stand by" as eco-protesters block the British motorway.
Mr Shapps wrote in a tweet: "Just Stop Oil protesters have been served with a National Highways injunction which covers the M25, and could face imprisonment or fines if they breach it by blocking the roads again.
"We will not stand by while lives are put at risk and roads are ground to a halt."
Just Stop Oil said "people are expected to die" after Britain saw record summer temperatures cause fires in some parts of the country.
Protesters climbed motorway signs and caused disruption.
One group of activists at junction 10 eastbound near Cobham, Surrey, climbed the gantries that support overhead information signs and caused nine-mile tailbacks.
A statement on the protest group's website reads: "This is without doubt the most important moment in UK history.
"All time temperature records are being obliterated, thousands of people are expected to die from heatstroke and the liars and plotters who are vying to lead us are too busy fighting among themselves to even care."
The statement adds: "We are therefore declaring the M25 a site of civil resistance against our criminal Government.
"We ask that no one travels on this motorway from Wednesday to Friday this week as we will be blocking the highway.
"We fully acknowledge the cost and disruption this will cause to the public and ask that they take their demands for compensation to the Government which has caused this unprecedented threat to our lives and liberties."
Transport Secretary Grant Shapps Victoria Jones
The M25 has been targeted by protesters Andrew Matthews