Following the ending of the Jin dynasty, ethnic minority peoples settled a series of short-lived sovereign states in northern China, commonly referred to as Sixteen Kingdoms.
During that period, the administrative system of Commanderies in Qin dynasty was abolished, the two Commanderies of Taiyuan and Yanmen (雁门郡) were combined as the vassal state of Han (韩国) under the rule of King Xin of Han (韩王信).
Later, King Xin of Han moved the capital from Jinyang to Mayi (present-day Shuozhou) with the approval from the emperor Gaozu.
As Li Shimin wrote in 619: "Taiyuan, the base of the imperial regime and the foundation of the state." (太原，王业所基，国之根本) In 690, Wu Zetian set Taiyuan as the Northern Capital, (Beidu, 北都), one of the three capitals, along with Chang'an and Luoyang, as depicted in the poem by Li Bai, "天王三京，北都居一" ("The king of the heaven has three capitals, the Northern capital is one of them.").
In 923, Li Cunxu, son of Li Keyong, founded Later Tang with capital of Daming, and soon conquered most of North China, and ended Later Liang.
During the Spring and Autumn period, the state of Jin emerged to the south of Taiyuan.