Craig Mullen, 1 Valeview, tried to headbutt the officer and strike him with handcuffs.
He also resisted, obstructed or hindered police in the execution of their duty in Majors Loan, Falkirk on August 15, 2019 by struggling with them and repeatedly attempting to break free when being escorted to a police vehicle.
Mullen, 43, appeared from custody at Falkirk Sheriff Court last Thursday.
Procurator fiscal depute Katie Cunningham said: “Police had engaged with the accused due to his level of apparent intoxication.
“He was detained for the purposes of a search. At that point he became hostile towards police.
“During an attempted search he said he would ‘have you lot’ and ‘cuffs off and I’ll show you a hard man’ and he called them ‘rats’.
“During the exchange with police he was resisting arrest and attempt to headbutt them.”
Sheriff Christopher Shead imprisoned Mullen for four months.