Frank Burgess was shouting and swearing, 'quite obviously while drunk' and making a general nuisance of himself on the night of January 30, said prosecutor Daniel Pietryka.
Back at the police station he spat through the hatch of his cell and the spittle landed on the officer's arm and leg.
The court heard he was last in trouble in August 2020, when he received a prison sentence.
Burgess, aged 56, of Milverton Road, admitted using threatening words and behaviour when he appeared at Nottingham Magistrates Court, the next day.
He denied assaulting the emergency worker - and said he only intended to make him think he was going to spit at him.
But he pleaded guilty, on a reckless basis, on the day of a trial, after seeing CCTV footage of the detention officer reacting when he spat.
Rebecca Meadows, mitigating, said Burgess has a number of mental and physical health problems, and a long history of alcohol misuse.
"He has used alcohol effectively as a way to self-harm and to moderate his moods," she said.
He is attending counselling sessions to help him cope without alcohol and is currently not drinking, she added.
On Wednesday, magistrates imposed an eight month community with a 120 day alcohol abstinence monitoring requirement.
He was ordered to pay £100 compensation, a £95 victim surcharge and a contribution to court costs of £85.