Abū Sa‘id Khudri relates: We were going with Allah’s Messenger (peace and blessings of Allah be to him). As we reached the place (known as) Arj, there met (us) a poet who had been reciting a poem. Thereupon Allah’s Messenger (peace and blessings of Allah be to him) said: Catch the Satan or detain the Satan, for filling the belly of a person with pus is better than stuffing his brain with poetry.
A poet is commonly a mental rambler who tries to transform his wayward whims and fleeting emotions into seemingly beautiful verses. He is more or less a dreaming reformer. His poetry expresses his emotional moods but he himself has no urge to embody his thoughts into living facts. The Qur'an says: “And they (poets) say that which they do not practise.” (26:226)
However there is a good number of Prophet’s sayings that prove that poetry is not something very condemnable in the eyes of Islam. In the hadīth literature we find even appreciation for some of the poets and their works like those of Hassan bin Thabit, Labid and Umayya bin Abū Salt. The Holy Prophet (peace and blessings of Allah be to him) is also reported to have said: “Verily in poetry there is wisdom.” Then the hadīth literature shows that the Holy Prophet (peace and blessings of Allah be to him) himself listened to the verses composed by Hassan bin Thabit and expressed appreciation for them.
When we view the stand of Islam on poetry, we come to the conclusion that Islam does not regard poetry or for that matter any other work of art as evil in itself. It is to be commended and encouraged if it emanates from minds steeped in faith, and tries to carry out in life the fine sentiments it expresses and aims at the Glory of Allah or the praise of persons who strive in the way of Allah rather than at self-glorification.