A 39-year-old man from Aalborg must pay fines totalling 4,000 kroner for posting hate speech on his Facebook page in October 2017.
The man was found to have written "macabre and threatening words against Muslims", local media Nordjyske reports.
The man denied having broken the law but admitted the writing the post, the court heard.
He said that the words were intended as part of a poem and should be considered a cultural input.
But Aalborg District Court found that the 39-year-old made threats of violence against Muslims, judging him guilty of breaching article 266b in Denmark's criminal law code, also known as the 'racism clause'.