Construction of the building began in July 1418 and was completed in August 1420. The famous Egyptian historian Maqrizi was present to see the construction. Unfortunately, al-Mu'ayyad died of illness the following year in 1421, before the building was able to properly begin its function as a hospital/maristan. In fact, it reportedly did not even provide services during the plague outbreak of 1419-1420. For a year, the building was inhabited by a group of Iranians then used by the Mamluk court as a guesthouse for ambassadors. In March 1422, under the reign of Sultan al-Ashraf Barsbay, the building was turned into a Friday mosque (for which it was already well-suited, given its qibla alignment). Part of the foundation's failure to serve its intended function may be due to a lack of information and instructions outlined in the documents of its waqf (a charitable trust in Islamic law). The waqf document briefly described the maristan but provided no instructions for how the space should be used, what services should be offered, or what staff should operate it (in contrast with the highly detailed waqf documents of Qalawun's older maristan, which continued to operate even up to modern times). As a typical Mamluk foundation of this sort, the descendants of al-Mu'ayyad were also entitled to keep any income from the endowments which financed the foundation. As a result, they may have had an interest in cutting out operational costs for the hospital. Barsbay likely established a new endowment and trust for the conversion and operation of the building to a mosque.
