Kieran Elliott was one of four men who ran out of The Green Dragon, on Leeming Lane, at around 10.30pm, on September 22.
He kept on running when officers in a police van ordered him to stop on Westgate, and slipped over when he dodged into the chuchyard.
Prosecutor Robert Carr said: “He swung a punch at an officer and refused to lie on the floor.
“The officer hit him on the leg with his baton.
“He laughed at him and told him to f*** off. He was hit on the leg twice more but continued swearing.
“He told them he didn’t care if they were the police.”
Treve Lander, mitigating, said Elliott, a fire protection officer, had been trying to sort out a dispute among two of his friends in the pub when the police were called.
On the night he mixed tablets for depression with alcohol, Mr Lander said.
Elliott, 20, of the Woodlands, Whaley Thorns, Langwith, admitted using threatening and abusive words, when he appeared at Mansfield Magistrates Court, on Friday.
He was fined £350, with £85 costs and a £35 government surcharge.