Gareth Scott, 37, admitted possession of heroin and driving without insurance or a licence, when he appeared at Mansfield Magistrates Court on Thursday.
His white Ibiza was stopped outside his home on Stone Crescent, on October 29, and a search of the car revealed a small wrap of the Class A drug, the court heard.
“He told police that he bought the heroin for £50 but split it with a friend,” said Ruth Snodin, prosecuting.
He was last convicted in 2014 for growing one cannabis plant, and his driving record had 12 points for speeding and driving without insurance in 2014, but he had not been disqualified.
James Whyley, mitigating, said Scott was working with local drug agencies and had reduced his drug intake over the last five years.
He was fined £120 and ordered to pay costs of £85 and a £30 victim surcharge. He was banned from driving for 12 months.