Driver Robert Laidlaw leapt from his Ford Focus, leaving his partner and child inside, as it travelled towards Uphall Primary School in West Lothian.
Police Constable Alan Beattie ran towards the moving car, pressed the footbrake with his hand and pulled the handbrake - managing to stop it.
Laidlaw was sentenced at Livingston Sheriff Court on Monday.
He pleaded guilty to various offences including driving while disqualified, having no insurance and reckless conduct.
The incident happened at around 12.30pm on Friday, June 10, while uniformed officers were on patrol in a marked vehicle.
PC Beattie and PC Scott Ward ran a check on the black Focus, which showed up as being uninsured.
It was then traced heading eastwards on West Main Street, Uphall.
As the car continued travelling towards the primary school car park, Laidlaw jumped out and ran off.
While Constable Beattie stopped the car, Constable Ward ran after Laidlaw and he was detained after being found hiding in nearby gardens.
Chief Inspector Stephen Innes, head of road policing for the east, said: “Robert Laidlaw showed a complete disregard for the safety of others, including himself.
“School children, pedestrians and other road users could’ve easily been hurt due to his behaviour, and it’s down to the quick-thinking actions of PC Beattie and PC Ward that no one was injured.
”It is totally unacceptable for anyone to be driving while disqualified and not to mention having no insurance.
“Our officers were simply doing their job, before using their initiative to rescue a situation that could have had tragic consequences.”