It has been reported in ahaadith that Sayyidina Rasulullah (Sallallahu Alayhi Wasallam) heard and recited poetry. Those sayings are classed as poetry that have deliberately been rhymed and composed according to the laws of poetry. It is certain that Sayyidina Rasulullah (Sallallahu Alayhi Wasallam) was not a poet. This is clearly stated in the Qur’aan, in reply to the surprising accusations of the kuffaar (non-believers) that he was a magician, or a mad person, na’udhu billah. Regarding his being a poet the Qur’aan clearly states,
“And We have not taught him [Muhammad Sallallahu Alayhi Wasallam] poetry, nor is it meet for him…” [Surah Yaseen, 69]
In a few instances where the sayings of Sayyidina Rasulullah (Sallallahu Alayhi Wasallam) are found to be rhymed, this was not said deliberately and hence could not be called poetry. According to this humble servant in reality it is a miracle of Sayyidina Rasulullah (Sallallahu Alayhi Wasallam) that he was not a poet. If a person’s sayings rhyme naturally, and further he deliberately tries to improve it. Then imagine how wonderful he can make it? But Allah Ta’ala has granted Sayyidina Rasulullah (Sallallahu Alayhi Wasallam) a much higher status, therefore his thought never wandered towards that. Many narrations have been reported on the praises and faults of poetry. In some it is stated that it is a good thing. In some it is prohibited and despised. A judgement between the two is also in a narration, that there is no good or bad in poetry itself. If the subject matter is good and beneficial, then poetry is a good thing. And if its effects are bad and detrimental and based on falsehood, then in the manner that the subject is prohibited or haraam or makruh, poetry will also be regarded as such. Even in the case where it is permissible, it is undesirable to indulge deeply in it.
[“Shama’il Tirmidhi”, Shaikhul Hadith Maulana Muhammad Zakarriya Muhajir Madni (nawarallahu marqadahu)]