Police officers Richard Tonks and Daniel Hackett confronted Richard Howell by chance, a judge was told.
They spotted the 43-year-old father of three at the rear of a BMW parked in one of a group of garages off Langstone Road, Russells Hall, Dudley, on July 8 last year, Wolverhampton Crown Court was told.
Pc Hackett was walking towards the defendant when he heard doors lock on the vehicle which was blocked in by the stationary police car as the defendant panicked having broken the terms of the licence which controlled his early release from prison and knew he would be returned immediately.
He reversed the car into the patrol car in which Pc Tonks was still sitting but it did not budge, said Ms Caroline Harris, prosecuting, so the defendant drove into the garage before backing out again at greater speed.
Pc Hackett smashed the driver's window, fired a debilitating spray and a Taser at Howell, who shrugged off the effect of both and finally managed to ram the police vehicle out of the way.
He accelerated onto Langstone Road but careered into a wall after losing control just yards up the street where he was cornered by the two police constables who opened fire again with a Taser.
He ignored the hit, got out of the car armed with a sledgehammer and shouted "come on then" to the startled officers before dropping the weapon when they backed away and attempting to flee until hit once more by a Taser shot.
The defendant said he had been paid £200 to move the BMW which had four machetes in it and had been stolen with a second car - jointly worth £45,000 - from an address in Wood Green Road, Wednesbury.
He was short of cash and desperate to avoid a return to prison, said Mr Charles Crinion, defending.
Howell, from Atlee Crescent, Bilston, whose 26 previous offences included causing death by dangerous driving, pleaded guilty to dangerous driving, handling stolen property and creating an immediate risk of serious harm by threatening the officers with the sledgehammer.