The Temple of Confucius at Beijing (simplified Chinese: 北京孔庙; traditional Chinese: 北京孔廟; pinyin: Běijīng Kǒngmiào) is the second largest Confucian Temple in China, after the one in Confucius' hometown of Qufu.
The temple was built in 1302, and officials used it to pay their respects to Confucius until 1911. The compound was enlarged twice, during the Ming and Qing dynasties and now occupies some 20,000 square meters. From 1981 until 2005, the Temple of Confucius also housed part of the art collection of the Capital Museum. It stands on Guozijian Street near the Imperial Academy.
The complex includes four courtyards aligned along a central axis. From south to north, noteworthy structures includes the Xianshi Gate (先师门), Dacheng Gate (Gate of Great Accomplishment, 大成门), Dacheng Hall (Hall of Great Accomplishment, 大成殿) and Chongshengci (崇圣祠). Inside the temple there are 198 stone tablets positioned on either side of the front courtyard, and they contains more than 51,624 names of jinshis (advanced scholars) of the Yuan, Ming and Qing dynasties, and 14 stone stele pavilions of the Ming and Qing dynasties that hold various historical documents of ancient China.
The temple also contains stone tablets recording the names of many generations of scholars who passed the Imperial Examination, a reproduction of a Western Zhou dynasty stone drum made during the reign of the Qianlong Emperor (1735–96), and stone steles containing the Thirteen Confucian Classics, presented by the city of Jintan in Jiangsu Province.