The Beijing Confucian Temple dates back to the Yuan Dynasty, in 1306, to commemorate Confucius.
In 1331, the emperor issued an order to allow the Confucian Temple to enjoy the same structure as the palace. Hence, four towers were set up in the four corners of the temple. But by the end of the Yuan Dynasty, the temple had become abandoned.
In 1411, during the Ming Dynasty, the temple was renovated and the Dacheng Hall was restored. The Dacheng Hall was further repaired in 1429. In 1530, Chongsheng Shrine was added to commemorate the ancestors of Confucius. In 1737, under the Qing Dynasty, Qianlong Emperor ordered that the most expensive yellow glaze roof be used for the temple.
After the founding of the People's Republic of China, the temple was repaired many times. In 1981, special funds were allocated to decorate the pavilions and halls in the temple, and the temple was set as the Capital Museum. Later it was open to the public.