Abu Hamid al-Ghazali was born in Tus, Persia, in 450 AH. His learning became famous early, and he became chief professor of the celebrated Nizamiyyah college in Baghdad, with hundreds of students at his lessons.
But at the height of his fame he fell into deep self-questioning. In his autobiographical work al-Munqidh min al-Dalal he writes that he examined his intention: was his teaching for Allah, or for fame and rank? The doubt troubled him so much that even speaking became hard.
In 488 AH he left everything — for Damascus, Jerusalem and the Hijaz. After years of worship and self-purification in seclusion he wrote his famous Ihya' 'Ulum ad-Din. He died in his home town of Tus in 505 AH.
ⓘ Later hadith scholars (such as al-'Iraqi) identified some weak hadith in the Ihya'; none of them is used in this story.