Sufi literature consists of works in various languages that express and advocate the ideas of Sufism.
Sufism had an important influence on medieval literature, especially poetry, that was written in Arabic, Persian, Turkic and Urdu. Sufi doctrines and organizations provided more freedom to literature than did the court poetry of the period. The Sufis borrowed elements of folklore in their literature.
The works of Nizami, Nava'i, Hafez, Sam'ani and Jami were more or less related to Sufism. The verse of such Sufi poets as Sanai (died c. 1140), Attar (born c. 1119), and Rumi (died 1273) protested against oppression with an emphasis on divine justice and criticized evil rulers, religious fanaticism and the greed and hypocrisy of the orthodox Muslim clergy. The poetic forms used by these writers were similar to the folk song, parable and fairy tale.
Sufi literature, written in Persian, flourished from the 12th to 15th centuries. Later, major poets linked with the Sufi tradition included Hatef Esfahani (17th century), Bedil (18th century), and Ahmad NikTalab (20th century). However, Sufi literature for the longest time in history had been scattered in different languages and geographic regions. From the 19th and 20th centuries onwards, the historiography of Sufism, especially in the west, has been the meticulous collection of diverse sources and facts regarding the subject. As compared to, say, broadly speaking, English or German literature, Sufi literature has been controversial because of the origin of Sufism itself as a tradition. Some scholars argue Sufism is a tendency within Islam whereas others argue that Sufism, as in the way of thinking, predates Islam. Radical Islamic scholars of an older generation, some even in contemporary times, dismiss the Sufi tradition as something that is purely mystical and therefore deny Sufism's spiritual lineage to Islam. Their argument is Sufism comes in the way of recognising the true nature of Islam.