Aqib Jawaid, aged 25, of Deeds Grove, High Wycombe, was jailed for three years at Aylesbury Crown Court.
Jawaid was also disqualified from driving for three and a half years and ordered to pay costs.
At a previous hearing, Jawaid pleaded guilty to two counts of possession with intent to supply class A drugs, namely crack cocaine and heroin, and one count each of: dangerous driving, driving without a license and driving whilst uninsured.
Investigating officer, PC Ben Pearmain, of the Stronghold Team based at High Wycombe police station, said: “Officers were driving along Green Street in High Wycombe on 20 July last year when they saw Aqib Jawaid driving in a manner that appeared he was trying to avoid them, nearly crashing into a shop and a parked car.
“Once officers stopped Jawaid’s vehicle, he was found in possession of crack cocaine and a key for a second vehicle. A quantity of heroin was then located in the second vehicle.
“Jawaid was arrested and following an investigation by the force’s Stronghold Team, he was charged with the offences.
“This case exemplifies the work of Thames Valley Police’s Stronghold team, which tackles organised crime in our region.