The Xianbei 鮮卑 were the most important and largest federation of nomad tribes of the steppe region north of China during the Jin 晉 (265-420) and Northern Dynasties 北朝 (386-581) periods. Traditional historians counted them among the Eastern Hu 東胡 barbarians and believed them to be relatives of the Wuhuan 烏桓. Yet there are many theories about the ethnic and linguistic affiliation. Some historians say they were proto-Mongols, others say they were proto-Turks. Among all Xianbei tribes the politically most successul were the Taɣbač (Chinese rendering Tuoba 拓跋) that founded the Northern Wei 北魏 (386-534) empire.
At the end of the 3rd century BCE the mighty federation of the Xiongnu 匈奴 subjugated the Eastern Hu. The Xianbei therefore migrated more eastwards, into the region of Liaodong 遼東 and settled down at the foot of Mt. Xianbei 鮮卑山, from which their name is derived. During the reign of Emperor Wu 漢武帝 (r. 141-87 BCE) of the Han dynasty 漢 (206 BCE-220 CE) who smashed the Xiongnu federation the Eastern Hu were also forced to recognize the suzerainty of the Han empire and were forced to settle down more southwards. The Xianbei therefore migrated into the region of the River Siramuren.
The Xianbei were pastoral nomads and excellent cattle breers. They were famous for their horses, sheep, and especially for the horns of the Saiga antelope (jiaoduannniu 角端牛) whose horn delivered a superb material for bows. Another business of the Xianbei was hunting, and they traded with sable and otter furs. The people of the Xianbei was organised in smaller tribes led by chieftains, who in turn obeyed to higher chieftains that commanded larger social structures.
The penal law of the Xianbei was very harsh, but criminals could buy themselves free with a certain number of cattle. Each year the whole federation of the Xianbei assembled in a grand conference at the banks of River Raole (the modern Siramuren River), where marriages were concluded and ceremonial banquets held. In recent decades several Xianbei graveyards have been unearthed in Inner Mongolia, for instance, in Chenbarhu Banner 陳巴爾虎旗 in Hulunbuir 呼倫貝爾盟. In this place it can be seen that male persons were often accompanied in death by horses and their kinsmen. Among the objects found in the earliest tombs some vessels were made of bone, and others of clay and bronze. The shape of many objects resembles that of Chinese objects, so that it can be assumed that they were obtained by trade with Chinese communities. Yet some of the bronze tools also show the influence of Xiongnu patterns and designs.
During the Former Han period 前漢 (206 BCE-8 CE) China was not very aware of the Xianbei, but at the beginning of the Later Han period 後漢 (25-220 CE), in 41 CE, and then again in 45 CE, the Xianbei and Wuhuan aligned with the Xiongnu and attacked border regions of the Han empire. While the Xiongnu plundered Shanggu and Zhongshan, the Xianbei robbed the border cities in Liaodong. The governor (taishou 太守) of the commandery of Liaodong, Ji Tong 祭彤, thereupon decided to allow the Xianbei to trade in certain border towns.
The Southern Xiongnu 南匈奴 finally declared their vassalship to the Han empire, and the Xianbei also began to deliver tributes to the Han court. In 49 CE the Xianbei chieftain Pianhe 偏何 payed a visito to governor Ji Tong who ordered the Xianbei to attack the Xiongnu tribe of the Left Yiyuzi 左伊育訾. From then on the Xiongnu and the Xianbei constantly engaged in feuds. Pianhe's troops also attacked the Wuhuan and defeated the tribe of the Chishan Wuhuan 赤山烏桓. From this time on the Xianbei were vassals of the Han, with the duty to appease the northern steppe zone. In 85 CE, for instance, the Xianbei concluded an alliance with the Southern Xiongnu, the Turkish Dingling 丁零 and several city states of the Tarim Basin in a joint attack on the Northern Xiongnu 北匈奴.
Two years later they invaded the eastern parts of the Northern Xiongnu territory and killed their khan. The Northern Xiongnu were so forced to migrate farther to the west, into the territory of the Indo-European Wusun 烏孫. The Xianbei took over the territorial vaccum and became masters of the Mongolian steppe at the end of the 1st century CE. Many Xiongnu that had not joined the westward migration became part of the Xianbei federation.
At the beginning of the 2nd century the Xianbei moved farther to the south to be closer to the border markets. It is even said that they had been invited to do so by Empress Dowager Deng 鄧太后. They migrated into territory formerly inhabited by the Wuhuan. These migrations caused an explosive ferment, and the Han court allied with the Southern Xiongnu and the Wuhuan to repel the Xianbei. In the mid-2nd century CE the Xianbei elected Tanshihuai 檀石槐 (156-181 CE) as their khan. He set up his seat at Mt. Mihan in the north of the modern province of Shanxi and began to threaten all his neighbours: The Dingling in the north, the Han border regions in the south, the Wusun in the west, and the state of Fuyu 夫余 in the east.
In 186 CE he began a large-scale attack on Han territory with the support of the Southern Xiongnu, the Wuhuan, Qiang 羌 and Di 氐. Emperor Huan 漢桓帝 (r. 146－167) forced the Southern Xiongnu and the Wuhuan into submission, but unable to defeat the Xianbei, he offered Tanshihuai the title of prince (wang 王) and a Han princess in order to conclude a "marriage for peace" (heqin 和親), yet the marriage was not concluded. During the reign of Emperor Ling 漢靈帝 (r. 167-189) the Xianbei many times raided the northern border regions of the Han empire and were never defeated by the punitive expeditions sent out to end the raids.
Tanshihuai was succeeded by his son Helian 和連 (181 CE) who was rather a weak leader and unable to prevent the disintegration of the Xianbei federation under khan Kuitou 魁頭 (181--183?). The southernmost tribes of the Xianbei were three, namely the group of khan Budugen 步度根 (183?-233, Inner Mongolia), the group of khan Kebineng 軻比能 (190-23, northern Shanxi), and the smaller tribes under Suli 素利 and Mijia 彌加 (Liaodong). During the late 2nd century Kebineng was the most powerful chieftain of the Xianbei. A lot of Chinese fled to his territory in order to escape economical and social problems. From these refugees the Xianbei learned Chinese and how to make modern weaponry. In 220 the Kebnineng sent horse tributes to the Han court and was rewarded with the title of Prince Fuyi 附義王 "the Attached-Righteous" by Cao Pi (Emperor Wen of the Wei 魏文帝, r. 220-226) who shortly after ended the Han and founded the Wei dynasty 曹魏 (220-265).
Kenineng continued his good relationships with the newly founded Wei empire and therefore became all the more powerful. He gradually took over leadership over the Xianbei under Budugen and then also over the eastern tribes of the Xianbei. So strengthened, he two times attacked Wei territory during the reign of Emperor Ming 魏明帝 (r. 226－239 CE). His attacks were also motivated by an alliance with Zhuge Liang 諸葛亮, counsellor of the empire of Shu 蜀漢 (221-263) in Sichuan. The Wei court therefore took a drastic decision: The Wei envoy in 235 had secretly assassinated Kebineng. After his death the Xianbei federation disintegrated again.
The most important tribes among the Xianbei living in the east were the Murong 慕容, Duan 段, Yuwen 宇文 and Tuoba 拓跋. The chieftain of the Murong supported the Wei general Sima Yi 司馬懿 during his attack on Gongsun Yuan 公孫淵 and was therefore rewarded with the title of Prince Shuaiyi. His descendant Murong Hui 慕容廆 declared his vassalship to Sima Yan 司馬炎 (Emperor Wu 晉武帝, r. 265-289), founder of the Jin dynasty. One branch of the Murong Xianbei migrated far to the west and settled down in the modern region of Qinghai. They unified the Tangutan tribes of the Qiang and founded the empire of the Tuyuhun 吐谷渾. The Duan were also vassals of the Jin dynasty and their chieftains were enfeoffed as Dukes of Liaoxi Commandery 遼西郡公. The Yuwen Xianbei lived between the River Ruyuan 濡源 (modern Luanhe 灤河) and the city of Liucheng 柳城 (modern Chaoyang 朝陽, Liaoning). Of these tribes, the Tuoba were living most to the west. Their chieftain Liwei 力微 had his seat in Shengle 盛樂 (near modern Helingge'r 和林格爾, Inner Mongolia) and was able to dominate the tribes living in this region. Liwei sent his son to Luoyang 洛陽 (modern Luoyang, Henan), the capital of the Jin empire, where he was educated in a Chinese way. During the reign of Emperor Huai 晉懷帝 (r. 306-312) the Tuoba chieftain Yilu 猗盧 was enfeoffed as Great Khan (da shanyu 大單于) of the Xianbei and Duke of Dai 代. His house ruled over the small state of Dai 代 (315-376). It was conquered by Fu Jian 苻堅 (r. 356-384), ruler of the Former Qin 前秦 (351-394), one of the Sixteen Barbarian States 五胡十六國 (300~430) that forced the Western Jin 西晉 (265-316) to flee to the southeast and controled northern China during the 4th and early 5th century.
At the beginning of the Eastern Jin period 東晉 (317-420) the Murong Xianbei forced the Yuwen and the Duan into their federation and founded the statelet of the Former Yan 前燕 (337-370). When this state fell apart, various members of the family of the Murong chieftains founded the Later Yan 後燕 (384-409), the Western Yan 西燕 (384-394) and the Southern Yan 南燕 (398-410). In 386 a Tuoba chieftain known as Tuoba Gui Tuoba Gui 拓跋珪 or Emperor Daowu 北魏道武帝 (r. 386-408) was able to revive the state of Dai and founded a dynasty that he called Wei. It is known in history as the Northern Wei and reunited northern China in one single state.
The chieftain of the tribe of the Qifu 乞伏 founded the Western Qin state 西秦 (385-431), and the tribe of the Tufa 禿髮 founded the Southern Liang 南涼 (397-414). Of all the late Xianbei tribes the Tuoba were the most influential. Not only were they able to conquer northern China, but their Northern Wei empire also provided so much historiographical material that a lot is known about the people of the Xianbei.
All these empires more or less adopted Chinese customs and merged with the Chinese population until the Tang period 唐 (618-907). The family name Yuwen even survived for a longer period of time.