According to the Restoration of Mosque (重修清真寺记), it was first established in the Zhizheng period (1341–1368) of the Yuan dynasty (1271–1368) and rebuilt in 1561, namely the 40th year of Jiajing period (1522–1566) of the Ming dynasty (1368–1644). The mosque turned to ashes by a devastating fire in 1628, and was restored in 1631, during the reign of Chongzhen Emperor. In the Qing dynasty (1644–1911), it was completely destroyed in the earthquake during the ruling of Daoguang Emperor (1821–1850), and was rebuilt on its original site in 1887, in the 13th year of Guangxu period (1875–1908).[1]