|Literal meaning||Agency at the Gate|
The Menxia Sheng (門下省), sometimes translated as the Chancellery, was one of the departments of the Three Departments and Six Ministries government structure of imperial China. It advised the emperor and the Zhongshu Sheng (Central Secretariat), and reviewed edicts and commands. As the least important of the three departments, it existed in name only by the Song dynasty while its functions were delegated to the other two departments. In 1129 the Chancellery was merged with the Central Secretariat.
The Chancellery was originally the Court of Attendants in the Han dynasty (206 BC – 9 AD), which oversaw all palace attendants. It was not until the Cao Wei and Jin dynasty (266–420) era that the institution of Chancellery was formalized. The Chancellery was led by a Director (menxia shizhong 門下侍中), with assistance from a gentleman attendant at the palace gate (Huangmen shilang 黃門侍郎 or jishi Huangmen shilang 給事黃門侍郎), later called Vice Director (menxia shilang 門下侍郎). They were responsible for advising the emperor and providing consultation prior to the issuing of edicts. During the Southern dynasties period, the Chancellery became responsible for the imperial coaches, medicine, provisions and the stables. During the Sui dynasty (581-618), it also became responsible for the city gates, the imperial seals, the wardrobe and the palace administration. These new external duties were reduced in the Tang dynasty (618-907) to just the city gates, the insignia, and the Institute for the Advancement of Literature. The Tang assigned several lower-ranking officials to the Chancellery to make records for the imperial diary.
The Tang called the Chancellery, headed by the Grand Chancellor, a number of different names such as the Eastern Terrace (Dongtai 東臺) or the Phoenix Terrace (Luantai 鸞臺). In cases where the Vice Directors of the Chancellery or Central Secretariat were officiating as Grand Chancellor, a supervising secretary (jishizhong), took over their work in the Chancellery. The position of supervising secretary originated in the Department of State Affairs, from where they were transferred to the Chancellery in the early Tang period. They were responsible for studying the drafts of memorials and implementing corrections before they were presented to the emperor.
The Chancellery began to decline in significance during the mid-Tang period as it competed in political power with the Central Secretariat. Ultimately control over the flow and content of court documents shifted over to the Central Secretariat. By the 9th century, the Chancellery was only responsible for the imperial seals, court ceremonies and the imperial altars. Some of its officials took care of lists of state examinees and household registers of state officials, while others were assigned to resubmit documents. Many of the associated titles were purely honorifics.
The Chancellery only continued to exist in name during the Song dynasty (960–1279) while its functions were carried out by the Central Secretariat and the Department of State Affairs. For example, the Left Vice Director of the Department of State Affairs was concurrently Director of the Chancellery. The Chancellery was reorganized into several different sections: personnel, revenue, military, rites, justice, works, the secretary's office, the office for ministerial routine memorandums, and finally the proclamations archive. In 1129, the Chancellery was merged with the Central Secretariat and became the Secretariat-Chancellery (zhongshu menxia 中書門下, shortened zhongshu 中書) or Administration Chamber (zhengshitang).
The Chancellery was also used in the Liao dynasty and the Jurchen Jin dynasty. In the Jin dynasty, it was abolished in 1156. The Mongol dominated Yuan dynasty decided not to revive the institution.