The first conflict of the Goguryeo–Tang War started when Emperor Taizong (r. 626–649) of the Tang dynasty led a military campaign against Goguryeo in 645 to protect Silla and punish Generalissimo Yeon Gaesomun for the killing of King Yeongnyu.
[8] Under his reign, Goguryeo became one of the great powers in East Asia, subdued neighboring kingdoms and achieved a loose unification of the Korean peninsula.
[15] This created conditions for the relationship between Silla and the Chinese dynasties to gradually tighten and by the 7th century, it became an alliance, threatening Goguryeo from both sides.
Notably, in 612, Emperor Yang of Sui mobilized an army of up to a million men to attack Goguryeo but failed miserably.
[18][19][4] In 7th century, Emperor Taizong of Tang, after conquering the Eastern Turks in 630 and several small polities along the Silk Road in 640, started to turn his attention to Goguryeo.
Emperor Taizong sent an official called Xiangli Xuanjiang (相里玄獎) to demand Goguryeo and Baekje cease their attacks on Silla, but Yeon Gaesomun refused.
On land, an army of 60,000 Tang soldiers and an unspecified number of tribal forces gathered at Youzhou (modern Beijing and surroundings) under the command of General Li Shiji in April 645.
[25] On 1 May, General Li Shiji's troops entered Goguryeo territory, crossed the Liao River farther north and surprised their opponents.
On 16 May, they laid siege to Gaimou (Kaemo) Fortress[note 1] and captured it in only 11 days, seizing 20,000 people and 100,000 shi (6 million liters) of grain.
General Li Shiji then proceeded toward Liaodong (Yodong) Fortress[note 2] and crushed a Goguryeo relief army of 40,000 troops.
Of these prisoners, the Tang forces sent 3500 officers and chieftains to China, executed 3300 Mohe troops, and eventually released the rest of the ordinary Goguryeo soldiers.
Exacerbated by worsened conditions for the Tang army due to the weather getting considerably colder with winter approaching and diminishing provisions, Emperor Taizong was compelled to order a withdrawal from Goguryeo on 13 October,[31] but left behind an extravagant gift for the commander of Ansi Fortress.
[27] Tang Taizong's retreat was difficult and many of his soldiers died as they were hit by a snowstorm.The combined total casualties of the campaign was said to have exceeded two thousands.