Al-Shafi lived in Mecca and Baghdad and then decided to move to Egypt. Imam Ash-Shafi’i wrote several books, the most well known of which is called Al-Umm, which is a collection of writings and lectures of the Imam. A number of his students have also collected his writings, lectures and rulings in the form of books, or quoted him in their books.
Imam Shafi died at the age of 53/54 in 820 in Cairo. Next to the grave of Imam Shafi is the grave of wife of Malik Adil, he was brother of Saladin (Salahuddin Ayubi).