The historian are in agreement that Xianbei have Mongolian origins. Their first leader, Tanshihuai, gathered strewn tribes together and invaded Hun and Chinese territories. He rose to power when he was very young, and he realised many political aims of Xianbei nation. He shrugged off Huns, and, in 158, he tried to secure the southern borders by attacking the Chinese, who responded with 30.000 soldiers who emerged victorious. Tanshihuai became a real leader, recognised in all Central Asia, but he died very early. After his death, the Xianbei dynasty knew many tensions and has no longer been unified.
The period from 250 to 550 was tumultuous for Central Asia and China. Xianbei and Huns attacked China and settled several governments that did not last long. Each nation waged war on the other. During this period of wars and rebellions, the Huns' Jiao state and the Xianbei's Muyun and Toba states were predominant. The Xianbei leaders were called "khan". This term has been applied later for all the nomadic governements.
Some Xianbei founded in the Mongolian steppes the Rouran kingdom. This large territory balanced the power of the Toba and the Tibetan Empires. Thanks to their complex government system, the Rouran efficiently took control of the Tele tribe at West. The Rouran introduced the military obedience. Like the Huns, Rouran believed in the spirits of nature, and they practised divination and witchcraft. Nevertheless, Buddhist missionaries were present in Rouran kingdom, and they practised many conversions, particularly the lama Dharmapriya who converted more than 300 Rouran families.
In the 6th century, the war between Rouran and Toba finally ended. Toba, a Xianbei province of China, fell in the hands of the people who took control of the land again. Rouran suffered from many mutinies from dominated people, particularly Turkish. In 545, the Turkish leader Bumin rebelled against Rouran domination and led people to China, where they all died or disappeared.