Police drew their Tasers when they were called to a Kirkby home after a man breached a restraining order, a court heard.
Officers were refused entry to the address on Cherry Avenue by a woman who said they needed a warrant, said prosecutor Neil Hollett.
When they entered the premises they found Alan Severn on the sofa, smoking a cigarette, at around 8.20pm, on August 7.
"They described him as being uncooperative to the extent that he had to be "red-dotted", that is drawing their Tasers," said Mr Hollett.
"He became violent at the police station and had to be taken straight to a cell."
He said that Severn, who is banned from contacting the woman and visiting her home by the restraining order that was made on July 29 - ten days before the offence.
He later told officers that he had been invited to the address by the woman, who made representations to get the order rescinded.
Mr Hollett said: "He breached bail on two previous occasions and was eventually remanded into custody."
Probation officer Lucy Harrison said Severn is currently on post-sentence supervision and a two-year community order, and was getting alcohol treatment and attending a "building better relationships" course.
Melanie Hoffman, mitigating, said: "He takes full responsibility. He went to the address to collect his belongings which were bagged up by the door.
"There is camera footage of the woman making it absolutely clear that she didn't want him to be re-arrested.
"It's not a usual scenario. This is a case where the restraining order was needed for whatever reason. It appears she no longer wants it."
Severn, 43, of Sycamore Avenue, Kirkby, admitted breaching the order when he appeared at Mansfield Magistrates Court, on Friday.
He was given a 12-week prison sentence, suspended for 12 months, and was ordered to pay a government surcharge of £122 and £85 costs.
He was reminded that the restraining order remains in place.
For more of the latest cases from Mansfield Magistrates Court, click here.