 Later, during Emperor Yang's preparation for war against Goguryeo, Yang Xuangan volunteered to serve, and his volunteering greatly pleased Emperor Yang, who trusted him more and more and gave him input in important governmental matters.In 613, as Emperor Yang was launching his second campaign against Goguryeo, he put Yang Xuangan in charge of ensuring food supplies at the important shipping junction of Liyang (黎陽, in modern Hebi, Henan).Yang Xuangan withheld the food supply ships, and then, in summer 613, occupied Liyang and declared an uprising, initially declaring that the general Lai Hu'er (來護兒) had revolted and that he was attacking Lai, but soon also declaring that he was restoring the laws of the time of Emperor Wen, signifying a repudiation of Emperor Yang.