Shanggu Commandery (Chinese: 上谷郡) was a commandery in imperial China from the Warring States period to Tang dynasty. It was located in present-day Hebei and Beijing.

The commandery was established by the state of Yan for the defense against the Xiongnu.[1] In Western Han dynasty, it administered 15 counties, including Juyang (沮陽), Quanshang (泉上), Pan (潘), Jundu (軍都), Juyong (居庸), Goumao (雊瞀), Yiyu (夷輿), Ning (寧), Changping (昌平), Guangning (廣寧), Zhuolu (涿鹿), Qieju (且居), Ru (茹), Nüqi (女祈) and Xialuo (下落). Guangyang Commandery was merged into Shanggu in Emperor Guangwu of Han's reign, but was restored in 96 AD, and two former Shanggu counties – Jundu and Changping – was transferred there. Later during Eastern Han, only 8 counties remained, namely Juyang, Pan, Ning, Guangning, Juyong, Goumao, Zhuolu and Xialuo. The total number of households was 36,008 in 2 AD, while the population was 117,762.[2] In 140 AD, the population was 51,204, and the households numbered 10,352.[3]

In early Eastern Han, some of the Wuhuan people settled within the empire's northern borders. Ning County in Shanggu became the seat of an office known as the "Colonel protecting the Wuhuan" (護烏桓校尉), which was in charge of relationships with the Wuhuan and Xianbei tribes and had the rank equivalent to that of a commandery's Grand Administrator (太守). A seasonal market was also established there.[4]

During Emperor Wu of Jin's reign, a new Guangning Commandery was established. Shanggu had 2 counties and 4,070 households, while Guangning administered 3 counties and 3,950 households. During the Sixteen Kingdoms era, the area was successively held by Later Zhao, Former Yan, Former Qin and Later Yan.[5] Later, Shanggu became part of Northern Wei until the Xiaochang era when it was lost during the Rebellion of Six Garrisons (六鎮之亂). It covered 2 counties – Pingshu (平舒) and Juyong – and had 3,093 households.[6] The commandery was abolished in early Sui dynasty.

In Sui and Tang dynasties, Shanggu Commandery became an alternative name for Yi Prefecture (易州). It consisted of 6 counties: Yi (易), Rongcheng (容城), Suicheng (遂城), Laishui (淶水), Mancheng (滿城) and Wuhui (五回). The population was 258,779 in 742 AD, in 44,230 households.[7]


  1. ^ Records of the Grand Historian, Chapter 110.
  2. ^ Book of Han, Chapter 28.
  3. ^ Book of Later Han, Chapter 113.
  4. ^ Bielenstein, Hans (1980). The Bureaucracy of Han Times. Cambridge University Press. p. 111.
  5. ^ Book of Jin, Chapter 14.
  6. ^ Book of Wei, Chapter 106.
  7. ^ New Book of Tang, Chapter 39.