The Qin general Meng Tian had forced Toumen, the Chanyu of the Xiongnu, out of the Ordos Desert in 215 BCE, but Toumen's son and successor Modu Chanyu built the Xiongnu into a powerful empire by subjugating many other tribes [REF].
After this defeat, the court adviser Liu Jing (劉敬, originally named Lou Jing [婁敬]) convinced the emperor to create a peace treaty and marriage alliance with the Xiongnu Chanyu called the heqin agreement [REF].