Abu’l-Fadl Ahmad ibn Hajar’s family originated in the district of Qabis in Tunisia. He became known as "Commander of the Faithful in Hadith", a very rare title in Islamic history. He was born in Egypt in 773, the son of the Shafi‘i scholar and poet Nur al-Din ‘Ali and the learned and aristocratic Tujjar. Ibn Hajar was entered in a Qur’anic school (kuttab) when he reached five years of age. Here he excelled, learning Surat Maryam in a single day, and progressing to the memorization of texts such as the Mukhtasar of Ibn al-Hajib on usul.
By the time he accompanied al-Kharrubi to Mecca at the age of 12, he was competent enough to lead the Tarawih prayers in the Holy City, where he spent much time studying and recalling God amid the pleasing simplicity of Kharrubi’s house, the Bayt al-‘Ayna’, whose windows looked directly upon the Black Stone. Two years later his protector died, and 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, after which he was able to travel to Damascus and Jerusalem, where he studied under more famous scholars. After a further visit to Mecca and Madina, and to the Yemen, he returned to Egypt.
When he reached 25 he married the lively and brilliant Anas Khatun, then 18 years of age. She was a hadith expert in her own right, holding ijazas from Zayn al-Din al-‘Iraqi, and she gave celebrated public lectures in the presence of her husband to crowds of ulema among whom was Imam al-Sakhawi. After the marriage, Ibn Hajar moved into her house, where he lived until his death. Many noted how she surrounded herself with the old, the poor and the physically handicapped, whom it was her privilege and pleasure to support. So widely did her reputation for sanctity extend that during her fifteen years of widowhood, which she devoted to good works, she received a proposal from Imam ‘Alam al-Din al-Bulqini, who considered that a marriage to a woman of such charity and baraka would be a source of great pride.
Once ensconced in Egypt, Ibn Hajar taught in the Sufi lodge (khaniqah) of Baybars for some twenty years, and then in the hadith college known as Dar al-Hadith al-Kamiliyya. During these years, he served on occasion as the Shafi‘i chief justice of Egypt, and was an Ash'ari scholar (like most scholars in history) of the Ahlus Sunnah.
It was in Cairo that the Imam wrote some of the most thorough and beneficial books ever added to the library of Islamic civilization. He wrote over 150 books, and in 817, Ibn Hajar commenced the enormous task of assembling his Fath al-Bari. It began as a series of formal dictations to his hadith students, after which he wrote it out in his own hand and circulated it section by section to his pupils, who would discuss it with him once a week. As the work progressed and its author’s fame grew, the Islamic world took a close interest in the new work.
In 833, Timur’s son Shahrukh sent a letter to the Mamluk sultan al-Ashraf Barsbay requesting several gifts, including a copy of the Fath, and Ibn Hajar was able to send him the first three volumes. In 839 the request was repeated, and further volumes were sent, until, in the reign of al-Zahir Jaqmaq, the whole text was finished and a complete copy was dispatched. Similarly, the Moroccan sultan Abu Faris ‘Abd al-‘Aziz al-Hafsi requested a copy before its completion. When it was finished, in Rajab 842, a great celebration was held in an open place near Cairo, in the presence of the ulema, judges, and leading personages of Egypt. Ibn Hajar sat on a platform and read out the final pages of his work, and then poets recited eulogies and gold was distributed. It was, says the historian Ibn Iyas, ‘the greatest celebration of the age in Egypt.’
Shaykh al-Islam Ibn Hajar departed this life in 852. His funeral was attended by ‘fifty thousand people’, including the sultan and the caliph; ‘even the Christians grieved.’ He was remembered as a gentle man, short, slender, and white-bearded, a lover of chess and calligraphy, much inclined to charity; ‘good to those who wronged him, and forgiving to those he was able to punish.’ A lifetime’s proximity to the hadith had imbued him with a deep love of the Messenger (may Allah bless him and grant him peace).
A more detailed bio is here: