The Temple of Confucius at Beijing (北京孔庙) is the second largest Confucian Temple in China after the one in Confucius' hometown of Qufu. It was built in 1302, and imperial 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 (大成门), Dacheng Hall (大成殿) 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 Jinshi (the advanced scholars) of the Yuan, Ming and Qing dynasties, and 14 stone stele pavilions of the Ming and Qing dynasties that hold the precious historical information 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 period stone drum made during the reign of Qianlong (1735-96), and 189 stone steles containing the Thirteen Confucian Classics, presented by the city of Jintan in Jiangsu Province.
The Temple has many old trees, including one Cypress tree known as the "Touch Evil Cypress" (Chu Jian Bai). Its name derives from a story that when a famously corrupt official passed by, the tree knocked off his hat.