Red Turban invasions of Goryeo

The Red Turban invasions of Goryeo occurred in the 14th century, when the Red Turban Rebellion against the Mongol-led Yuan dynasty spread to the Goryeo dynasty of Korea. The Red Turban rebels, originating in the Zhejiang area, were opposed to the Yuan dynasty. After gaining control of Liaodong, the Red Turbans invaded Goryeo in 1359 and 1360.

Background
The Mongol invasions of Korea lasted from 1231 to 1259, and Goryeo capitulated to the Mongol empire under an agreement of a condition "not changing the local custom" (不改土風), and became their son-in-law nation (駙馬國) in 1270 until 1356. In the mid-14th century, when the Yuan dynasty was beginning to crumble due to the Red Turban Rebellion, Gongmin reformed the Korean government, abolished Mongolian military outposts, purged pro-Yuan sentiments, and regained lost northern territories. The Red Turbans attacked Goryeo most likely because of military exigency.

First Red Turban invasion
In December 1359, part of the Red Turban army moved their base to the Liaodong Peninsula. However, they were experiencing a shortage of war materials and lost their withdrawal route to Chinese mainland. The Red Turban army led by Mao Ju-jing invaded Goryeo and took the city of Pyongyang. In January 1360, the Goryeo army led by An U and Yi Bang-sil retook Pyongyang and the northern region which had been captured by the Red Turbans. Of the Red Turban army that had crossed the Yalu River, only 300 troops returned to Liaoning after the war.

Second Red Turban invasion
In November 1360, the Red Turban troops invaded again Goryeo's northwest border with 200,000 troops and they occupied Gaegyeong, the capital of Goryeo, for a short period, King Gongmin escaped to Andong. However, Generals Ch'oe Yŏng, Yi Sŏng-gye (later Taejo of Joseon), Jeong Seun and Yi Bang-sil repulsed the Red Turban army. Sha Liu and Guan Xiansheng, who were Red Turban generals, were killed in the battles. The Goryeo army continually chased their enemy and repelled them from the Korean Peninsula.

Aftermath
Although Goryeo had repulsed the Red Turbans, both its population and economy had been severely damaged. Wokou pirates had been troubling the southern peninsula for some time. Generals Ch'oe Yŏng and Yi Sŏng-gye were called upon by King Gongmin to combat them, thereby giving the successful generals much influence and a power base in the country. General Yi Sŏng-gye especially identified himself with the reformist Sinjin faction.

In 1388, unwilling to lead the invasion of Liaodong and fight the Ming dynasty, General Yi Sŏng-gye decided to revolt against U of Goryeo and his fellow general, Ch'oe Yŏng, and swept back to the capital, Gaegyeong, to secure control of the government. In 1392, General Yi founded Joseon dynasty.