Officers went to Marcus Walmsley’s home and saw a plastic bag containing cannabis beside him.
He was with two pals and immediately accepted the cannabis - worth about £30 - was his, Chesterfield magistrates heard.
Helen Griffiths, prosecuting, said: “He said: ‘I’m giving it to the lads to celebrate’. It seems it was the birthday of one of them,”
Walmsley was arrested and later handed in a statement to police saying he bought the cannabis for £50 a few days before.
Derbyshire's poshest village is named among England's most desirable places to live for second year running
17 photos show parched fields, dwindling rivers and barren reservoirs across Derbyshire – as drought is officially declared
Harry Styles spotted with girlfriend Olivia Wilde on Derbyshire’s Chatsworth Estate
Derbyshire man charged with attempted murder after reported stabbing
Police concerned for safety of missing Chesterfield man
“He said it was for his own use and he was not going to supply it to anyone and he shared a single spliff with a friend,” added Mrs Griffiths.
Walmsley (28) of Smedley Street, Matlock, admitted possessing cannabis on October 3 last year.
He was cautioned by police for a similar offence two years ago. He was fined £93, with £85 costs.