The Temple of Confucius (Kong Miao) is located in Guozijian Street. It is here that Confucius was worshipped during the Yuan, Ming and Qing dynasties (1271 - 1911). The temple was first built by Kublai Khan in 1302 in the Yuan Dynasty, and was restored and rebuilt on several occasions during the Ming and Qing dynasties. In 1737, during the reign of Qing Emperor Qianlong, the major hall was renovated and was recovered with magnificent yellow glazed roof tiles. In 1906, when the worship of Confucius was further emphasized by the Qing Government, the temple underwent extensive restoration which lasted until 1916.
Covering a total area of 22,000 square metres, the temple makes up four courtyards. The principal structures include Xianshimen (Gate of Ancient Teacher), Dachengmen (Gate of Great Accomplishment), Dachengdian (Hall of Great Accomplishment), Chongshengci (Worship Hall), the eastern part of the front courtyard is taken up by the Pavilions for Stone Tablets, the Holy Kitchen, the Pavilion for Sacrificial Animals and the Well Pavilion; in the west, there are more pavilions for Stone Tablets, the hall of Vegetarian Diet and the Gate of Reverence which opens onto Guozijian (Imperial Academy). One either side of the courtyard, are arranged 198 stone tablets bearing 51,624 names of Advanced Scholars of the Yuan, Ming and Qing dynasties who passed the triennial imperial examinations. Inside the Gate of Great Accomplishment are placed ten stone drums which were made on ancient models 1736 to 1795 of the Qing Dynasty and erected two tablets associated with the event.