Around the Christian era, Xiongnu, an ancient nationality, dominated the Mongolian Plateau to the north of the Great Wall. In order to prevent the northern power from invading and harassing, the ruler of the Western Han Dynasty ordered to have protective defense work constructed and heavily armored guards stationed in the border areas, and Western Han soldiers frequently attacked Xiongnu. Later in the period of Eastern Han Dynasty, Xiongnu split up into two, the northern branch and the southern branch. The southern branch submitted itself to the rule of the Eastern Han Dynasty, and settled down in the north of Shanxi, living together with the Han people. The Wei Kingdom further divided the southern branch into five, and sent them to different regions in Shanxi. Meanwhile, other minorities, including Jie, Qiang, Di and Xianbei, also began to migrate southward to live a farming-and-herding life. Till the end of Western Jin, Liu Yuan of the Xiongnu minority established a state of Han, ushering in the period of Sixteen Kingdoms. In the 200 years that followed, Shanxi became the central stage upon which northern minorities fought and contended for hegemony.
The Tuoba tribe of Xianbei nationality used to live a nomadic life on the E’lunchun Prairie, and it gradually migrated southward into Shanxi. In the period of Sixteen States, it rose abruptly. In 338 AD Shiyijian set up the State of Dai in Fanshi (to the west of the present Hunyuan county) and began to fight for hegemony. In the year of 398 AD Tuoba Gui moved its capital to Pingcheng (the present Datong in Shanxi), where he built ancestral temples and set up a state with a new title known as Northern Wei in history. Later he was succeeded by Tuoba Tao,who united north China and covetously eyed the south of the Yangtze River. In the approximate 100 years before Emperor Xiaowen moved the capital to Luoyang, Pingcheng had become the hub of politics, economy, military affairs, and culture in the north. The Yungang Grottoes, the Yonggu Mausoleum in Fangshan county, the ritual altars, and the tomb of Sima Jinlong all witnessed the prosperity of the Pingcheng times.
In the late years of the Northern Wei Dynasty, disturbance and bloodshed prevailed and the Dynasty existed in name only. The political power was held in the hands of Gao Huan, a warlord in Jinyang who made his name by suppressing the Liuzhen Uprising. With the power monopolized, the Wei Dynasty split up into two---the Eastern Wei and the Western Wei. Gao Huan designated a puppet emperor for the Eastern Wei and he moved its capital to Yecheng (the present Linzhang in Hebei province), while he himself presided as prime minister and assumed personal command in Jinyang, taking remote control over state affairs. In550A.D., Gao Yang, the son of Gao Huan, dethroned the Eastern Wei and designated himself as the emperor of a dynasty historically known as the Northern Qi. With all these changes, Jinyang had always been the basis of political power of the two dynasties. And its position as a center of politics, military affairs, economy and culture was irreplaceable, which can be envisioned from the excavation of several tombs including Lou Rui, Xu Xianxiu and Yu Hong.
Archaeological discoveries have indicated that the scale of economic and cultural exchanges since Northern Dynasty was far beyond our previous knowledge. Messengers and merchants from various parts of Asia and countries around the Mediterranean area had gathered in Pingcheng and Jinyang. Foreign religious ideas, culture and art had been widely absorbed and accepted. The picture of “thousands states coming and paying respect” in the heyday of Tang Dynasty began to take shape. The introduction of foreign cultures had undoubtedly enriched Chinese traditional culture and art.