Surah 21

Surah 21:5

"‘No!’ they say, ‘(It is) a jumble of dreams! No! He has forged it! No! He is a poet! Let him bring us a sign, as the ones of old were sent (with signs).’"

– No! He is a poet!
The negative sense of “poet” and “poetry” (shi‘r) in a number of passages seems to come from a concept in the Quran that poetry is associated with the inspiration of devils or jinn. Some scholars also suggest that in the seventh century Arabic poetry was increasingly used for obscenity or curses.
In fact, many parts of the Quran are made up of lines that rhyme. Scholars refer to this as “rhymed prose” rather than poetry. The rhyme is constructed through a vowel plus the final consonant at the end of each verse. In the longer narrative sūras the rhyme is created by the use of stock phrases such as “Allah is all-knowing, all-wise.”
On the accusation in this verse that the messenger is inventing, see the discussion at 69.44.

- from The Quran with Christian Commentary: A Guide to Understanding the Scripture of Islam