Nomadic empire
The Xiongnu were a confederation of nomadic tribes from Central Asia with a ruling class of unknown origin and other subjugated tribes. They lived on the Mongolian Plateau between the 3rd century BC and the 460s AD, their territories including modern day Mongolia, southern Siberia, western Manchuria, and the modern Chinese provinces of Inner Mongolia, Gansu, and Xinjiang. The Xiongnu was the first unified empire of nomadic peoples. Relations between early Chinese dynasties and the Xiongnu were complicated and included military conflict, exchanges of tribute and trade, and marriage treaties. When Emperor Qin Shihuang drove them away from the south of the Yellow River, he built the famous Great Wall to prevent the Xiongnu from coming back.
Han–Xiongnu War
When Emperor Wu made the decision to conquer the Hexi Corridor, he had the intention to separate the Xiongnu from the Western Regions and from the Qiang people. In 88 BC, the Xianling tribe of the Qiang people sent an envoy to the Xiongnu, proposing a joint-attack against the Han in the region as they were discontented that they had lost the fertile lands at Jiuquan and Zhangye. It had often been the meeting place between the Xiongnu and the Qiang before the Han empire had conquered and annexed the Hexi Corridor. In 6 BC, Wang Shun (王舜) and Liu Xin noted that the frontier commandaries of Jiuquan, Zhangye, and Dunhuang were established by Emperor Wu to separate the then-powerful Chuoqiang tribe of the Qiang people from the Xiongnu. The Chuoqiang tribe and its king, however, eventually submitted to the Han empire and took part in the campaigns against the Xiongnu.