At the end of the Western Han Dynasty, Wang Mang usurped the Han Dynasty and established himself as a new dynasty. When he sent envoys to change the seals, he replaced the royal seals of the vassal kings with the seals of the princes. This was dissatisfied by the various tribes led by the Xiongnu, and finally raised troops to capture the fortress of Dunhuang and march directly into Chang'an.
Dunhuang City Lord Gucheng, with a small number of elite soldiers, defended Yumen Pass, composing a heroic song of defending the territory. And during the confrontation with the Hun heroine Xu Buyu'er, the two gradually developed a mutual sympathy and turned their hostility into friendship, ending a protracted war between the two sides.