Muhammad ibn Idris ash-Shafi'i was born in Gaza in 150 AH — the year Imam Abu Hanifah died. He lost his father as a child, and his mother brought him to Makkah.
Biographers relate that, too poor to buy paper, he wrote on pieces of bone and leather. He memorised the Quran in childhood, then went to Madinah and learned al-Muwatta' from Imam Malik.
Later, studying in Iraq and Egypt, he wrote ar-Risalah — the first ordered discussion of how rulings are derived from the Quran, the Sunnah, consensus and analogy. For this he is called the founder of the principles of jurisprudence. He died in Egypt in 204 AH.