The mosque was built during the Fatimid era in the year 549 AH, corresponding to the year 1154 AD, under the supervision of Minister Al-Saleh Talaa. The mosque includes 3 doors built of white marble overlooking Khan Al-Khalili, and another door next to the dome, known as the Green Gate.
The mosque was named by this name based on the narrations of a section of Egyptian historians with the presence of the head of Al-Hussein bin Ali buried in it, as these narrations mention that with the beginning of the Crusades, the ruler of Egypt, the Fatimid caliph, feared the honorable head of the harm that might befall it in its first place in the city of Ashkelon in Palestine, so he sent He asks for the head to come to Egypt and carry the honorable head to Egypt and bury it in its current location, and the mosque is built over it