By the late 14th century, the nearly 500-year-old Goryeo established in 918 was tottering, its foundations collapsing from years of war spilled over from the disintegrating Yuan dynasty. Following the emergence of the Ming dynasty, the royal court in Goryeo split into two conflicting factions, one supporting the Ming and the other standing by the Yuan. In 1388, a Ming messenger came to Goryeo to demand that territories of the former Ssangseong Prefectures be handed over to Ming China. The tract of land was taken by Mongol forces during the invasion of Korea, but had been reclaimed by Goryeo in 1356 as the Yuan dynasty weakened. The act caused an uproar among the Goryeo court, and General Choe Yeong seized the chance to argue for an invasion of the Ming-controlled Liaodong Peninsula.
General Yi Seong-gye was chosen to lead the attack; he revolted, swept back to the capital Gaegyeong (present-day Kaesong) and initiated a coup d'état, overthrowing King U in favor of his son, Chang of Goryeo (1388). He later killed King U and his son after a failed restoration and forcibly placed a royal named Wang Yo on the throne (he became King Gongyang of Goryeo). In 1392, Yi eliminated Jeong Mong-ju, highly respected leader of a group loyal to Goryeo dynasty, and dethroned King Gongyang, exiling him to Wonju, and he ascended the throne himself. The Goryeo kingdom had come to an end after 474 years of rule.
In the beginning of his reign, Yi Seong-gye, now ruler of Korea, intended to continue to use of the name Goryeo for the country he ruled and simply change the royal line of descent to his own, thus maintaining the façade of continuing the 500-year-old Goryeo tradition. After numerous threats of mutiny from the drastically weakened but still influential Gwonmun nobles, who continued to swear allegiance to the remnants of the Goryeo and to the now-demoted Wang clan, the consensus in the reformed court was that a new dynastic title was needed to signify the change. In naming the new kingdom, Taejo contemplated two possibilities – "Hwaryeong" (his place of birth) and "Joseon". After much internal deliberation, as well as endorsement by the neighboring Ming dynasty's emperor, Taejo declared the name of the kingdom to be Joseon, a tribute to the ancient Korean state of Gojoseon.