Abu ʿAbdillah Muhammad ibn Idris al-Shafi‘i (Arabic: ابو عبدالله محمد بن إدريس الشافعيّ) was a Muslim jurist, who lived from (767 — 820 CE / 150 — 204 AH). He was active in juridical matters and his teaching eventually led to the Shafi'i school of fiqh (or Madh'hab) named after him. Hence he is often called Imam al-Shafi‘i. He is considered the founder of Islamic jurisprudence.
The biography of al-Shāfi‘i is difficult to trace. Dawud al-Zahiri was said to be the first to write such a biography, but the book has been lost. The oldest surviving biography goes back to Ibn Abi Hatim al-Razi (died 327H/939) and is no more than a collection of anecdotes, some of them fantastic. The first real biography is by Ahmad Bayhaqi (died 458H/1066) and is filled with what a modernist eye would qualify as pious legends. The following is what seems to be a sensible reading, according to a modern reductionist point of view.
After that he lived in Mecca and Baghdad, until 814/198.
Among his teachers were Malik ibn Anas and Muḥammad ibn al-Ḥasan al-Shaybānī, whom he studied under in Madinah and Baghdad.
He was appointed as a judge in Najran in the time of Harun ar-Rashid. Sunnis portray that his devotion to justice, even when it meant criticizing the governor, caused him some problems, and he was falsely accused of aiding the Alawis in a revolt. He was taken in chains before the Caliph at Raqqa in 803/187. Shaybānī was the chief justice at the time, and his defense of Shafi'i, coupled with Shafi'i’s own eloquent defense, convinced Harun ar-Rashid to dismiss the charge, and he directed Shaybānī to take Shafi'i to Baghdad. He was also a staunch critic of Al-Waqidi's writings on Sirah.
In Baghdad, he developed his first madh'hab, influenced by the teachings of both Imam Abu Hanifa and Imam Malik. Thus, his work there is known as “al Madhab al Qadim lil Imam as Shafi’i,” or the Old School of ash-Shafi'i.
al-Shafi'i left Baghdad in 804/188, possibly because Hanafi followers had complained to Shaybani that Shafi'i had become somewhat critical of the school during their disputations; as a result, Shafi'i is said to have participated in a debate with Shaybani over their differences, though who won the debate is disputed.After spending some time teaching in Mecca, where Hanbal is said to have heard him lecturing at the Sacred Mosque, Shafi'i eventually returned to Baghdad in 810/194.
Many stories are told about the childhood and life of ash-Shafi'i, and it is difficult to separate truth from myth:
Tradition says that he memorized the Qur’an at the age of seven; by ten, he had memorized the Muwatta of Imam Malik; he was a mufti (given authorization to issue fatwa) at the age of fifteen. He recited the Qur’an every day in prayer, and twice a day in Ramadan. Some apocryphal accounts claim he was very handsome, that his beard did not exceed the length of his fist, and that it was very black. He wore a ring that was inscribed with the words, “Allah suffices Muhammad ibn Idris as a reliance.” He was also known to be very generous.
He was also an accomplished archer, a poet, and some accounts call him the most eloquent of his time. Some accounts claim that there were a group of Bedouin who would come and sit to listen to him, not for the sake of learning, but just to listen to his eloquent use of the language. Even in latter eras, his speeches and works were used by Arabic grammarians. He was given the title of Nasir al Sunnah, the Defender of the Sunnah.
He loved Muhammad very deeply. Al Muzani said of him, “He said in the Old School: ‘Supplication ends with the invocation of blessings on the Prophet, and its end is but by means of it.’” Al-Karabisi said: “I heard al-Shafi’i say that he disliked for someone to say ‘the Messenger’ (al-Rasul), but that he should say ‘Allah’s Messenger’ (Rasul Allah) out of veneration for him.” He divided his night into three parts: one for writing, one for praying, and one for sleeping.
Apocryphal accounts claim that Imam Ahmad said of ash-Shafi'i, “I never saw anyone adhere more to hadith than al-Shafi’i. No one preceded him in writing down the hadith in a book.” Imam Ahmad is also claimed to have said, “Not one of the scholars of hadith touched an inkwell nor a pen except he owed a huge debt to al-Shafi’i.”
Imam Muhammad al-Shaybani said, “If the scholars of hadith speak, it is in the language of al Shafi’i.”
Shah Waliullah, a 18th century Sunni Islamic scholar stated:
“ A Mujadid appears at the end of every century: The Mujtahid of the 1st century was Imam of Ahlul Sunnah, Umar bin Abdul Aziz. The Mujadid of the 2nd century was Imam of Ahlul Sunnah Muhammad Idrees as-Shafi'i the Mujadid of the 3rd century was Imam of Ahlul Sunnah Abu Hasan Ashari the Mujadid of the 4th century was Abu Abdullah Hakim Nishapuri. ”
According to many accounts he was said to have a photographic memory. One anecdote states that he would always cover one side of a book while reading because a casual glance at the other page would commit it to memory.
He claimed that the game of chess was an image of war, and it was possible to play chess as a mental exercise for the solution of military tactics. Chess could not be played for a stake, but if a player was playing for a mental exercise, he was not doing anything illegal. Provided the player took care that his fondness for chess did not cause him to break any other rule of life, he saw no harm in playing chess. He played chess himself, defending his practice by the example of many of his companions.