The mosque's construction is considered all the more remarkable as it coincided with the devastation wrought by the Black Plague, which struck Cairo repeatedly from the mid-14th century onwards. Its construction began in 1356 CE (757 AH) and work proceeded for three years "without even a single day of idleness". In fact, work appears to have continued even up to 1363, even after Sultan Hasan's death, before eventually ceasing. An inscription on the mosque notes the name of amir Muhammad ibn Biylik al-Muhsini as the supervisor of the construction of the mosque. Unusually, his name was placed near Sultan Hasan's in the inscription, which demonstrates how important the undertaking of the project must have been.The amir's high standing otherwise was another indication of this prestige, as he was appointed governor of Cairo in 1330 and oversaw other construction projects including the renovation of the hippodrome established by al-Zahir Baybars near the Citadel.
The most substantial available source concerning the mosque's construction is al-Maqrizi, writing six decades afterwards, as he had access to administrative documents that are unavailable to historians today. The manual labour needed for construction must have been partly depleted by the ongoing ravages of the plague, yet this does not appear to have been the main challenge. Maqrizi mentions that the construction of the mosque cost 30,000 dirham every day. The total construction costs amounted to over one million dinars, making it the most expensive mosque in medieval Cairo. Even the Sultan is said to have become discouraged at times by the cost of the project. Financing for the mosque was made possible by a few factors: first, the austerity measures implemented by Manjaq, one of the amirs in charge of state affairs before Sultan Hasan reached maturity; secondly, the influx of wealth to the state caused by the plague-related deaths of many Mamluk amirs whose properties were subsequently transferred to the state treasury, including the enormous wealth of amir Shaykhu; and thirdly, through extortion of the sultan's subjects during his reign.
The importance and scale of the building project also attracted craftsmen from all over the Mamluk empire, including the far-away provinces of Anatolia, which may explain the diversity and innovativeness of the mosque's design and decoration. It is also believed that limestone from the Pyramids of Giza was quarried for use in the mosque's construction.