Sean Campbell (31) had cocaine in his sock when he led the gardai through three pursuits in succession as they tried to stop his dangerous driving.
Campbell, of Mellowes Road, Finglas, was jailed for five months.
He had initially been given a suspended sentence, but Judge Hugh O'Donnell activated it after Campbell was convicted of another offence.
He pleaded guilty to dangerous driving at Hansfield Road, Anally Grove and Allendale Estate, Littlepace, on April 30, 2011.
He also admitted failing to stop for a garda and possession of cocaine. Sgt Mary Doherty told Blanchardstown District Court gardai were on patrol when they saw the defendant driving on the wrong side of the road.
They signalled him to stop and he drove off. He was eventually apprehended and arrested and €80 worth of cocaine was found in his sock. Recognisances were fixed in the event of an appeal.