He bagan his studies at the age of five and completed the memorisation of the Qur'an by the age of nine. A Shafi'i scholar and hadith master, he studied under renowned scholars in Cairo, Yemen and the Hijaz. Known as Shaykh al-Islam, scholars travelled from far away lands to take knowledge from him. Appointed to the position of chief-judge several times, he authored more than fifty works on hadith, history, biography, Quranic exegesis, poetry and Shafi'i jurisprudence; among the most famous of them is his fourteen-volume commentary on Sahih al-Bukhari called Fath al-Bari.
His education in Egypt was entrusted to the hadith scholar Shams al-Din ibn al-Qattan, who entered him in the courses given by the great Cairene scholars al-Bulqini (d.806) and Ibn al-Mulaqqin (d.804) in Shafi‘i fiqh, and of Zayn al-Din al-‘Iraqi (d.806) in hadith, after which he was able to travel to Damascus and Jerusalem, where he studied under Shams al-Din al-Qalqashandi (d.809), Badr al-Din al-Balisi (d.803), and Fatima bint al-Manja al-Tanukhiyya (d.803). After a further visit to Mecca and Madina, and to the Yemen, he returned to Egypt.