He was 104.
Shafi’s son Anas Madani confirmed the matter, saying his father died at the Asgar Ali Hospital in Gendaria around 6:40 pm in the evening.
Shafi was shifted from Chattogram Medical College Hospital in the afternoon as his condition deteriorated.
Earlier Shafi, also the chief of Hefajat-e-Islam, resigned from his madrasa post after a meeting of Majlis-e-Shura (policymaking body) on Thursday night, citing health grounds.
He was admitted to Chattogram Medical College Hospital and later shifted to a hospital in the capital.
Shah Ahmad Shafi was rector of Al-Jamiatul Ahlia Darul Unum Moinul Islam Hathazari, to give the institution its full name, and also the chairman of Bangladesh Qawmi Madrasah Education Board.
Also read: Home minister meets Hefazat chief Shafi
He was born in 1916 (1334-35 AH) in Rangunia of Chattogram and was educated at Hathazari Madrasah and Darul Uloom Deoband.
Shafi commenced his career as a teacher at AL-Jamiatul Ahlia Darul Ulum Moinul Islam Hathazari madrasa in Chittagong.