Skip to content
Teachers

Who Was Imam al-Ghazali? His Life, His Books and His Turn to Sufism

By 8 min read

Updated:

Imam al-Ghazali (1058-1111) is one of the most widely read scholars in the history of Islam. He studied law, theology and philosophy, rose to the head of the greatest madrasa in Baghdad, then gave up that post and lived for about ten years on the Sufi path. The book he wrote in those years, the Ihya Ulum al-Din, has been read in madrasas and Sufi lodges for nine hundred years. He was given the title Hujjat al-Islam, “the Proof of Islam”. In this article we will look first at his life, then at why he left Baghdad, then at his main books, and finally at what he thought Sufism is.

His Life

Al-Ghazali was born in 1058 in Tus, a town in the region of Khorasan in the northeast of present-day Iran. His father spun and sold wool and died early. Al-Ghazali and his brother Ahmad were entrusted to a friend of their father. Ahmad later became a well-known Sufi himself. Al-Ghazali took his first lessons in Tus, then went to Jurjan. In Nishapur he became the student of Imam al-Haramayn al-Juwayni, the greatest Shafi’i jurist and Ash’ari theologian of the age, and stayed with him until his teacher died in 1085.

After his teacher’s death al-Ghazali came under the patronage of Nizam al-Mulk, the vizier of the Seljuk sultans. Nizam al-Mulk had founded madrasas in the Seljuk cities, called the Nizamiyya. The largest of them was in Baghdad. In 1091 the vizier appointed al-Ghazali professor at the Nizamiyya of Baghdad. Al-Ghazali was thirty-three years old. He taught there for four years, and about three hundred students attended his lectures. The Fada’ih al-Batiniyya, his refutation of the Batinis written at the request of the Abbasid caliph al-Mustazhir, also belongs to this period.

Why He Left Baghdad

Al-Ghazali told the story of this period years later in a book called al-Munqidh min al-Dalal. The title means “The Deliverer from Error”, and in it al-Ghazali writes the story of his own life. He says that while he was teaching he examined his intention and saw that he was not doing this work purely for God’s sake, and that the wish for position and fame had entered into it. This thought occupied him for months; in the morning he decided to leave Baghdad, by evening he changed his mind. In the month of Rajab 1095 his tongue seized up and he could not lecture; he stopped eating and sleeping. By his own account the physicians found no medicine and said, “This illness comes from the heart, and its cure is for the heart to be freed of its trouble.”

In November 1095 al-Ghazali left Baghdad with the intention of making the pilgrimage. He left his post at the madrasa to his brother Ahmad, set aside what his family needed to live, and gave the rest away. He went first to Damascus, where for nearly two years he lived in seclusion in the Umayyad Mosque, occupied with disciplining his nafs and with dhikr. Then he went to Jerusalem, and from there on the Hajj. In these years he lived a simple and ascetic life. About ten years later, in 1106, at the insistence of the vizier Fakhr al-Mulk, the son of Nizam al-Mulk, he began teaching again at the Nizamiyya of Nishapur. But he did not stay there long and returned to Tus, the town where he was born. Next to his house he built a madrasa for students and a lodge for Sufis. He gave his time to teaching the Quran and hadith, to conversation with his students and to the knowledge of the heart. He died in Tus on 14 Jumada al-Akhira 505, that is 18 December 1111, at the age of fifty-three. According to his brother Ahmad, on his last morning he made his ablution and prayed, asked for his shroud, kissed it and laid it over his eyes, and said, “Gladly, to enter the presence of the King.”

His Main Books

About seventy of al-Ghazali’s works have come down to us; the number of works attributed to him is far larger. Here we will look at the four that are most widely read.

The Ihya Ulum al-Din is his greatest work, and its name means “The Revival of the Religious Sciences”. Al-Ghazali wrote it in the years after he left Baghdad. In its introduction he criticizes the religious learning of his time in these terms: the jurists know the rulings but lose sight of the purpose of the ruling, and the theologians learn to prevail in debate but do not reform their hearts. The book has four main parts. The first part deals with acts of worship, the second with the manners of daily life (eating, marriage, earning a living, friendship), the third with the traits that lead a person to ruin (anger, envy, pride, riya, love of the world), and the fourth with the states that lead to salvation (repentance, patience, gratitude, trust in God, love). Each part has ten books; the whole work is forty books. The Ihya has been translated into many languages and is still in print.

The Tahafut al-Falasifa, “The Incoherence of the Philosophers”, is al-Ghazali’s critique of the philosophy represented by al-Farabi and Ibn Sina. Before this work he wrote the Maqasid al-Falasifa, an impartial summary of the philosophers’ views. When this summary was translated into Latin, medieval Europe for a time took al-Ghazali himself for a follower of Ibn Sina. In the Tahafut he takes up twenty questions and shows that the philosophers have not produced conclusive proof on any of them. Three of the twenty he judges to be unbelief: the views that the world is eternal, that God does not know particulars, and that the resurrection in the hereafter will be of the soul alone. In the introduction al-Ghazali leaves logic and mathematics outside his critique; his objection is to the claim that reason gives certain knowledge in matters beyond its own limit. A century later Ibn Rushd answered this book with his Tahafut al-Tahafut.

The al-Munqidh min al-Dalal is the source of the story told above. In it al-Ghazali divides the seekers of truth into four groups and examines each in turn: the theologians, the Batinis, the philosophers and the Sufis. In his view theology is useful for refuting heretical opinions, but it does not give the heart certain knowledge. The Batinis claim that truth can only be learned from an infallible imam; al-Ghazali rejects this claim with rational arguments. The philosophers overstate the power of reason and pass definite judgement on matters reason cannot reach. Al-Ghazali says that he found certain knowledge among the Sufis, because their knowledge rests not on reading alone but on living.

The Kimiya-yi Sa’adat, “The Alchemy of Happiness”, is an abridged version of the Ihya written in Persian for a wide readership. Besides these, the Ayyuha al-Walad, a short treatise of counsel written for a student, and the Bidayat al-Hidaya, a guide to daily worship and conduct, are also among his most widely read works.

What Sufism Is, According to al-Ghazali

In the al-Munqidh al-Ghazali makes a comparison when he describes the Sufis. To know the definition of health and of satiety is one thing; to be healthy and satisfied is another. Theology and philosophy give the first kind of knowledge, the kind that rests on definition and proof. The knowledge of Sufism is of the second kind and can only be gained by living it. When al-Ghazali read the books of the Sufis he understood that their way could not be learned by reading. The Sufis call this knowledge dhawq; the word means tasting, that is, knowing a truth by experiencing it oneself. By al-Ghazali’s own account, this conviction played a part in his decision to leave Baghdad.

In al-Ghazali’s understanding of Sufism the Sharia and the tariqa cannot be separated. In his view, to claim spiritual states without carrying out the commands of the religion is worthless, and a learning that does not know the purpose of the rulings and the states of the heart is incomplete. The Ihya treats these two sides together: it explains the legal rulings of each act of worship, then describes the side of that act which faces the heart. In the section on the states of the heart he defines the nafs, the ruh, the heart and the intellect one by one, and explains which meaning the Sufis intend when they say “nafs”. This work was decisive in fixing the place of Sufism within the learning of the Ahl al-Sunna, and on the question of where Sufism stands within Islam it remains one of the most consulted sources today.

For al-Ghazali, reason and Sufism are not opposed to each other. Reason examines proofs, removes wrong opinions and brings a person to certain knowledge in the fundamentals of faith. But knowing God also has a side that is gained through the heart, and that side opens only through the training of the nafs and constancy in worship. Al-Ghazali’s own life followed this order: first long years of study and teaching, then the years of seclusion and training of the nafs. The Ihya is the work that brings the fruit of these two periods together.

Sources

  • Al-Ghazali, al-Munqidh min al-Dalal (c. 1108)
  • Al-Ghazali, Ihya Ulum al-Din (c. 1097)
  • Al-Ghazali, Tahafut al-Falasifa (1095)
  • Al-Subki, Tabaqat al-Shafi’iyya al-Kubra (entry on al-Ghazali)
  • Mustafa Çağrıcı, “Gazzâlî”, TDV İslâm Ansiklopedisi, vol. 13, Istanbul 1996, pp. 489-505

Tags

ghazaliimam ghazalial-ghazaliihyaihya ulum al-dinal-munqidhtahafutnizamiyyahujjat al-islamtasawwuf

Related Articles

Cite as

Raşit Akgül. “Who Was Imam al-Ghazali? His Life, His Books and His Turn to Sufism.” sufiphilosophy.org, March 1, 2026 (October 25, 2026 last modified). https://sufiphilosophy.org/teachers/ghazali

Search