Richard Melvin was spotted by cops driving an Audi A3 at a petrol station and later drove through a red light and on the wrong side of the road to evade being caught.
But police later tracked down the car parked near Melvin’s own address.
Melvin appeared from custody at Edinburgh Sheriff Court on Monday and pled guilty to failing to stop for police and driving without due care and attention.
He also admitted driving without a licence or insurance.
Fiscal depute Duncan McKenzie said officers on patrol saw the Audi at a Shell petrol station in Musselburgh, East Lothian, at around 10.15pm.
Mr McKenzie said they observed a man wanted on an unrelated matter get into its passenger seat.
The court heard that the car travelled in the direction of Portobello, where officers attempted to use lights and sirens to signal the car to pull over.
The prosecutor said that the Audi accelerated away and overtook another vehicle, travelling at 50mph along Seaview Terrace and onto Portobello High Street - which has a 20mph speed limit.
The Audi overtook a car at a red light, Mr McKenzie said, and went through a junction “showing no concern for traffic”.
It continued along Sir Harry Lauder Road and onto Duddingston Park South before being lost to sight, the court was told.
The Audi was later found in the city’s Brunstane area on the street where Melvin lived while CCTV from the petrol station identified the accused as the driver.
The incident took place on July 3, 2020.
Defence agent Mark Hutchison said his client was currently serving three years and ten months in prison.
Sheriff Matthew Auchincloss disqualified Melvin from driving for 12 months upon his release from custody.