In 604, Emperor Wen died—a death that traditional historians, while admitting a lack of direct evidence, generally believed to be a murder ordered by his son and
Yang Guang the
Crown Prince. Yang Guang took the throne as Emperor Yang, and Su Wei continued to serve as co-prime minister. In 607, despite Su's opposition, Emperor Yang built a section of the
Great Wall from
Yulin to Zihe (紫河, in modern
Hohhot,
Inner Mongolia), employing over a million men in labor. Su was subsequently removed from office. However, Su escaped the fate of Gao Jiong, Yuwen Bi (), and Heruo Bi (), who were executed for their similar oppositions to Emperor Yang's construction and military campaigns. In the fall of 615, while Emperor Yang was touring the frontier districts,
Shibi Khan and the
Eastern Turks launched a surprise attack against
Yanmen Commandery in reprisal against various offenses by the emperor. Princess Yicheng—daughter of a Sui clansman—secretly informed the emperor of the attack, and Emperor Yang and his entourage fled to the safety of the commandery seat at present-day
Daixian,
Shanxi. Shibi Khan then besieged the town on September 11. Yuwen initially suggested that Emperor Yang fight his way out of the siege, but Su opposed taking such risks and eventually, under the advice of Emperor Yang's brother-in-law
Xiao Yu, Emperor Yang sought more aid from Princess Yicheng. Emperor Yang's extravagant promises of promotion and reward brought reinforcements and Princess Yicheng falsely informed the khan that the Turks were under attack from the north. Shibi Khan then lifted the siege. With the northern empire under the effects of agrarian rebellions, Su subsequently advised Emperor Yang to return to the capital Chang'an, and Emperor Yang initially agreed. However, Yuwen suggested going to the eastern capital
Luoyang instead, and Emperor Yang went to Luoyang and would never again go to Chang'an in his lifetime. Subsequently, when Su was examining the proposed promotions to soldiers based on their contributions assisting Yanmen Commandery lift the siege, he reviewed them strictly and promoted few of them, a decision that Emperor Yang agreed with, but which brought much dissension among the army ranks.—a lament by the five brothers of King
Taikang of
Xia dynasty that he lost his kingdom due to his excessive cruelty and hunting—and believed that Su was criticizing him. He was further incensed when Su, while discussing the issue of another campaign against Goguryeo, sarcastically suggested that if Emperor Yang pardoned all of the agrarian rebels, there would be hundreds of thousands of soldiers available to attack Goguryeo. Emperor Yang thereafter complained about Su to Pei Yun, and Pei Yun then had a man named Zhang Xingben () accuse Su of inappropriate promotions and fear of Tujue. Emperor Yang removed Su from his posts, and then further accusations that Su was conspiring with Tujue were made. Emperor Yang had Pei Yun investigate it, and Pei proposed that Su be executed. Su, unable to prove his innocence, begged for forgiveness. Emperor Yang took pity and released him, but stripped him of citizenship rights, along with his descendants for three generations. Soon, however, it appeared that Su was restored to some extent, as he accompanied Emperor Yang to Jiangdu (江都, in modern
Yangzhou,
Jiangsu) in 617, although he was not restored to his posts, as Pei Yun and Yu suggested to Emperor Yang that Su was too old to be effective. == After Emperor Yang's death ==