In 598, when Emperor Wen attacked Goguryeo, Yang Liang served as co-commander of the operation (along with the general Wang Shiji ()). The Sui forces later withdrew, Goguryeo then sued for peace. (During the campaign, the general Gao Jiong served as Yang Liang's lieutenant, and, due to his senior status, often disobeyed the young Yang Liang, causing Yang Liang to be so displeased that he complained to his mother Empress Dugu, further straining the relationship between Empress Dugu and Gao over Gao's refusal to endorse Yang Guang, her favorite son, as crown prince, and in 599, at Empress Dugu's urging, Emperor Wen removed Gao from his post.)
In 598, Emperor Wen launched an attack on Goguryeo, with Yang Liang and Wang Shiji leading the charge. The Sui forces eventually withdrew, prompting Goguryeo to seek peace. Meanwhile, General Gao Jiong served as a subordinate to Yang Liang, but his senior status often led him to disobey Yang Liang, causing tension between them. This ultimately led to Yang Liang complaining to his mother Empress Dugu, further straining their relationship with Gao over his refusal to support Yang Guang as crown prince. In 599, at Empress Dugu's urging, Emperor Wen removed Gao from his position.