Quick answer: Muhammad ibn Idris al-Shafi’i (767 to 820 CE) is widely credited with giving usul al-fiqh, the principles for drawing rulings from evidence, its first systematic form in his book al-Risala. Britannica says the Risala, written in the last five years of his life, entitles him to be called the father of Muslim jurisprudence. Sources agree on the outline of his life but differ on his birthplace and on when he settled in Egypt.
How we know his life
The early record is thin. Britannica states that little is known for certain of his life. The oldest surviving biography goes back to Ibn Abi Hatim al-Razi, and the first full biography was written by al-Bayhaqi. Later reference works draw on these. The IslamQA biography, for example, lists al-Dhahabi’s Siyar A’lam al-Nubala’ among its main sources, and the Siyar is a biographical collection by al-Dhahabi arranged by generations.
One historian’s caution is worth keeping in mind. The Wikipedia article on al-Shafi’i notes that a great deal of legend had crept into his story even in early biographical sketches. This article therefore separates what the sources agree on from what they report with differences.
Timeline at a glance
| Date (CE / AH) | Event | Status in the sources |
|---|---|---|
| 767 / 150 AH | Born. Most accounts say Gaza | Place differs (Britannica says only “Arabia”) |
| Childhood | Father dies; raised by his mother in Makkah | Agreed |
| Before 795 / 179 AH | Studies in Makkah, then in Madinah under Malik ibn Anas | Agreed |
| After 795 | Goes to Yemen; holds a post in Najran | Post is called governor in one account, judge in another |
| 803 | Taken to Harun al-Rashid at al-Raqqa after an accusation, then freed | Event agreed; details of the accusation and release differ |
| Early 800s | Studies in Baghdad with Muhammad al-Shaybani | Agreed; order of later moves differs |
| 195 to 199 AH | Second stay in Baghdad, then leaves for Egypt | Reported in Shafi’i biographical tradition |
| 815/816 (Britannica) | Settles in Egypt for the rest of his life | Differs from the 199 AH date above |
| Last five years | Writes al-Risala; revises it in Egypt | Agreed in outline |
| 20 January 820 / 204 AH | Dies at al-Fustat, Egypt | Agreed |
Makkah and Madinah: the student years
His father died when he was very young, and his mother brought him up in poor circumstances in Makkah. One account adds that he was born in Gaza in 150 AH, and two years later his mother, Fatimah, took him to Makkah so that her family could help raise him. Another source reports that he had memorised the Quran by the age of seven.
In Makkah he studied with Muslim ibn Khalid, Sufyan ibn ‘Uyaynah and others. He then went to Madinah, where he was taught for many years by Malik ibn Anas, who was impressed with his memory, knowledge and intelligence. One report says he borrowed Malik’s Muwatta from a friend and memorised it in seven nights, while another gives the age of 15 for the same feat, so the detail is best treated as reported rather than fixed. He is also reported to have said that no book on earth after the Book of Allah is more authentic than the book of Malik. You can read more about Malik on the site in the article on Imam Malik and the Muwatta.
Respect did not mean agreement. Malik and al-Shaybani were among his most prominent teachers, and he took positions against both of them in fiqh. That habit of weighing evidence even against one’s own teachers shaped the method he later wrote down.
Yemen, al-Raqqa and Baghdad
After Malik’s death in 795, al-Shafi’i went to Yemen. One account says he was appointed Abbasid governor in the city of Najran at the age of thirty, while another says he served for a period as a judge there.
In 803 his career took a hard turn. He was accused of aiding the Alids in a revolt and was summoned in chains, together with a number of Alids, to the caliph Harun al-Rashid at al-Raqqa. The sources differ on why he was spared. Some accounts say al-Shaybani was at the court and defended him as a known student of the sacred law. Another account says the caliph forgave him because of the strength of his argument and his reaffirmed loyalty, while nine co-defendants were executed.
The episode brought him close to al-Shaybani. Britannica says he studied in Baghdad with this important jurist of the Hanafi school. He is quoted as saying that he wrote a camel-load from Muhammad ibn al-Hasan. He left Baghdad for Makkah in 804, possibly because Hanafi followers complained that he had grown critical of al-Shaybani’s positions. He taught in the Haram, returned to Baghdad in 195 AH and stayed until 199 AH.
The method: what al-Risala did
Usul al-fiqh asks how a ruling is derived from its evidence, before it asks what the ruling is. The Risala explains how Islamic rulings should be taken from evidence, especially the Quran and the Sunnah. It gives special attention to the Quran, the Sunnah, ijma (consensus of scholars) and valid reasoning.
Two points stand out in the scholarly accounts. The first is his defence of the Sunnah. Daniel Brown is cited as saying that al-Shafi’i forcefully argued that the Sunnah stands on equal footing with the Quran as a binding source, since the Prophet’s command is Allah’s command. That argument rests on verses such as the one below, which tells believers to obey Allah and the Messenger ﷺ.
يَٰٓأَيُّهَا ٱلَّذِينَ ءَامَنُوٓا۟ أَطِيعُوا۟ ٱللَّهَ وَأَطِيعُوا۟ ٱلرَّسُولَ وَأُو۟لِى ٱلْأَمْرِ مِنكُمْ ۖ فَإِن تَنَٰزَعْتُمْ فِى شَىْءٍۢ فَرُدُّوهُ إِلَى ٱللَّهِ وَٱلرَّسُولِ إِن كُنتُمْ تُؤْمِنُونَ بِٱللَّهِ وَٱلْيَوْمِ ٱلْءَاخِرِ ۚ ذَٰلِكَ خَيْرٌۭ وَأَحْسَنُ تَأْوِيلًا
O you who have believed, obey Allah and obey the Messenger and those in authority among you. And if you disagree over anything, refer it to Allah and the Messenger, if you should believe in Allah and the Last Day. That is the best [way] and best in result.
The second point is the ordering of evidence. The Quran and the prophetic tradition are the primary sources attributed to the book, and most commentators also treat its sections on consensus and analogical reasoning (qiyas) as sources. A caution applies here: the neat division into four sources has been attributed to later commentators on the work rather than to al-Shafi’i himself. The story behind the title is also unverified. Tradition says he wrote it in answer to a request from the Basran traditionist ‘Abd al-Rahman ibn Mahdi.
Describing him as the founder of the field is common, and it needs a qualifier. The Risala was among the earliest works devoted to the subject and gave Islamic legal theory a systematic form. The phrase “among the earliest” matters, because the same Wikipedia article’s list of earlier jurists includes Abu Yusuf (729 to 798), who is credited with writing on usul al-fiqh. Al-Shafi’i’s distinction, in the accounts above, lies in the systematic arrangement. How the Hanafi, Maliki and Hanbali schools each build their own usul is not covered here.
Egypt: the old and the new opinions
Al-Shafi’i’s legal opinions are divided into two periods. The qawl qadim, or old opinion, refers to the opinions he recorded in Baghdad, and the qawl jadid, or new opinion, to the revised opinions he held after moving to Egypt. The school’s default is to give precedence to the later opinions, because he specifically changed his mind on certain rulings.
There are exceptions. A relatively small number of rulings follow the older opinion, usually because later scholars found the evidence for it stronger, and the exact number is disputed, with some putting it near twenty.
Dating the move to Egypt is where the sources diverge. One biography says he relocated in 199 AH. Britannica has him in al-Fustat until 810, then travelling again, and returning to Egypt in 815/816 for the rest of his life. Readers should treat the exact year as unsettled.
His Egyptian writing was productive. In Egypt he wrote works that formed part of his new school, among them the large fiqh work Kitab al-Umm. He also reworked the Risala there. The Kitab al-Umm entry on the Internet Archive adds that he wrote a book called Ikhtilaf al-Hadith, though Shafi’i scholars differ over whether it belongs to the old or the new opinions.
Death and what followed
Britannica gives his death as 20 January 820 at al-Fustat, Egypt. His teaching circle did not end with him. Al-Buwayti was among his closest companions and succeeded him as head of his circle in Egypt. Al-Muzani, who died in 264 AH, wrote Mukhtasar al-Muzani, an abridgement of the Umm. He had begun as a Hanafi and moved to the Shafi’i school on meeting al-Shafi’i.
Al-Buwayti’s end shows the cost scholars sometimes paid. He was arrested, chained and sent from Egypt to Baghdad, and he reportedly kept teaching fellow prisoners until his death in prison in 231 AH. The same era saw the trial of Ahmad ibn Hanbal, who appears on the list of men who transmitted al-Shafi’i’s old opinions. That story is told in the site’s article on Imam Ahmad and the Quran trial.
The school spread through students and trade. Students in Cairo and Baghdad first spread his thought, and by the 10th century Makkah, Madinah and Syria were also chief centres. Under Salah al-Din it again became the paramount school in Egypt, and merchants carried it across the Indian Ocean to India and Southeast Asia. Today it is described as predominant in the Horn of Africa, Southeast Asia, Lower Egypt and Kerala, among other places.
What the reader can take from his life
- Learn from several teachers. He studied under Sufyan ibn ‘Uyaynah in Makkah, Malik in Madinah and al-Shaybani in Baghdad. He took their knowledge seriously and still tested it against evidence.
- Revision is part of scholarship. The qawl qadim and qawl jadid show a jurist who changed his own opinions when he met new places, people and evidence.
- Method protects consistency. The Risala shows why scholars of every school ask how a ruling was reached. For a personal question, a qualified local scholar can explain which school’s reasoning applies.
Sources
- Britannica: Abu Abd Allah al-Shafi’i
- Wikipedia: Al-Shafi’i
- Wikipedia: Al-Risala (al-Shafi’i book)
- iHadis: Al-Risala by Imam Shafi’i Explained
- Internet Archive: Imam Shafi’s Kitab al-Umm
- SeekersGuidance: Can you give me all the old opinions of Imam al-Shafi’i which are considered authoritative?
- IslamQA: Biography of Imam Shafi’i
- Wikipedia: Siyar A’lam al-Nubala’
- Wikipedia: Al-Buwayti
- Wikipedia: Al-Muzani
- Wikipedia: Al-Muwatta
- Wikipedia: Shafi’i school
- MuftiSays: A brief outline on Shafi’i madhab’s transmission
- ResearchGate: Al-Shafi’i (biographical article)
Header image: illustration, AI-generated.

