He claimed it was art and he was only expressing himself and not attempting to threaten or intimidate the individuals/groups in question, even though he was aware they would likely interpret it as threats. This is really a million times more threatening that some vague expression against an ethnicity. The supreme court ruled 8-1 in his favor. The US Supreme Court is extremely supportive of free speech, including the most detestable.
As an aside the links on the scotusblog are extremely high quality and provide lots of plain language analysis of the technical points. A phenomenal resource for any case or issue you're ever interested in learning about the legal nuances behind. For instance this  is their coverage of the 'gay cake' case.
 - https://www.scotusblog.com/case-files/cases/elonis-v-united-...
 - https://www.scotusblog.com/case-files/cases/masterpiece-cake...
In this context it was not indeed a standalone statement.
from the wikipedia page indeed his statements are quite general and in a sense artistic. He did not argue for killing his ex-wife, there is no reading where he could encourage others to kill his ex-wife.
He really had a wish for it and was talking about it.
From what is reported in the wikipedia article even something like "I think it is a good idea to kill my ex-wife" would have been too much.