But his wife didn't see it that way, and neither did federal prosecutors. A jury convicted Elonis of violating a federal law that makes it a crime to threaten another person. A federal appeals court rejected his claim that his comments were protected by the First Amendment.
Lawyers for Elonis argue that the government must prove he actually intended his comments to threaten others. The government says it doesn't matter what Elonis intended; the true test of a threat is whether his words make a reasonable person feel threatened.
One post about his wife said, "There's one way to love you but a thousand ways to kill you. I'm not going to rest until your body is a mess, soaked in blood and dying from all the little cuts."
The case has drawn widespread attention from free-speech advocates who say comments on Facebook, Twitter, and other social media can be hasty, impulsive and easily misinterpreted. They point out that a message on Facebook intended for a small group could be taken out of context when viewed by a wider audience.
Read MoreFacebook shuttle drivers unionize
"A statute that proscribes speech without regard to the speaker's intended meaning runs the risk of punishing protected First Amendment expression simply because it is crudely or zealously expressed," said a brief from the American Civil Liberties Union and other groups.
So far, most lower courts have rejected that view, ruling that a "true threat" depends on how an objective person perceives the message.
For more than four decades, the Supreme Court has said that "true threats" to harm another person are not protected speech under the First Amendment. But the court has been careful to distinguish threats from protected speech such as "political hyperbole" or "unpleasantly sharp attacks."
Elonis argues that his online posts under the pseudonym "Tone Dougie" were simply a crude and spontaneous form of expression that should not be considered threatening if he didn't really mean it. His lawyers say the posts were heavily influenced by rap star Eminem, who has also fantasized in songs about killing his ex-wife.