Taiyuan Commandery (Chinese: 太原郡) was a commandery of China from the Warring States period to Tang dynasty. It was located in modern central Shanxi province.
The commandery was established by the Qin state in 248 BC, after Qin general Meng Ao attacked Taiyuan, then part of the State of Zhao, and annexed 37 Zhao cities including Yuci (榆次), Xincheng (新城) and Langmeng (狼孟). The seat was Jinyang (晉陽, near modern Taiyuan city), a former capital of Zhao. In early Western Han dynasty, the territory was successively part of the Han Kingdom of King Xin, and the kingdoms of Dai and Taiyuan. In 114 BC, Taiyuan was once again administered directly as a commandery. In 2 AD, the commandery administered 21 counties, namely Jinyang, Junren (葰人), Jiexiu (界休), Yuci (榆次), Zhongdu (中都), Yuli (于離), Cishi (茲氏), Langmeng (狼孟), Wu (鄔), Yu (盂), Pingtao (平陶), Fenyang (汾陽), Jingling (京陵), Yangqu (陽曲), Daling (大陵), Yuanping (原平), Qi (祁), Shang'ai (上艾), Lüchi (慮虒), Yangyi (陽邑), and Guangwu (廣武). The population was 680,488, or 169,863 households. By 140 AD, the number of counties had decreased to 16, and the population to 200,124, or 30,902 households.
In 280 AD, after the unification of Western Jin, the commandery had 13 counties (Jinyang, Yangqu, Yuci, Yuli, Yu, Langmeng, Yangyi, Daling, Qi, Pingtao, Jingling, Zhongdu, Wu) and 14,000 households. The commandery was abolished in 583 during early Sui dynasty.
In Sui and Tang dynasties, Taiyuan Commandery became an alternative name of Bing Prefecture (并州), and later, Taiyuan Prefecture (太原府). In 742 AD, the commandery had a population of 778,278, or 128,905 households in 13 counties.