Johnson, 35, had reached a deal with prosecutors that included community service and counseling with no jail time. But when Broward County Circuit Judge Kathleen McHugh asked if he was satisfied with his lawyer Adam Swickle, Johnson gave Swickle a light swat on the rear, as football players routinely do to each other on the field.
The move made the courtroom erupt in laughter, and then McHugh angrily rejected the deal.
"I don't know that you're taking this whole thing seriously. I just saw you slap your attorney on the backside. Is there something funny about this?" McHugh said. "The whole courtroom was laughing. I'm not going to accept these plea negotiations. This isn't a joke."
Johnson was on probation after pleading no contest to head-butting his then-wife, TV reality star Evelyn Lozada, during an altercation last August.
The six-time Pro Bowl wide receiver tried to apologize and insisted he meant no disrespect.
"This is your courtroom. I have no intent to make this a joke. It's not funny," Johnson said. "My life is in a shambles right now, and I try my best to laugh and keep a smile on my face."
But McHugh, who could have sentenced Johnson up to a year in jail, was not changing her mind. Johnson was handcuffed and hauled away to jail.
Johnson is a free agent who has not signed with another NFL team. His best playing days were with the Cincinnati Bengals, and he also played for the New England Patriots. He appeared on the 10th season of "Dancing With The Stars."
The Associated Press contributed to this report.