Ahmed drove about 65 miles (100km) from Smethwick to Winsford with a car full of cannabis estimated to have a potential street value of between £1,440 and £2,250.
The 39-year-old, from Smethwick, was sentenced at Chester Crown Court on Wednesday, having pleaded guilty to possession with intent to supply class B drugs on 27 June.
PC Uren continued: “Ahmed was well aware that the drugs were in his car but he thought that it was worth the risk to drive all the way to Winsford from Smethwick in order to retrieve his friend’s property from a previous arrest.
“Fortunately, the security staff at HQ sniffed him out and reported him to officers who were quickly able to reprimand him for his actions.”