Joseon was the last dynastic kingdom of Korea, lasting just over 500 years. It was founded by Yi Seong-gye in July 1392 and replaced by the Korean Empire in October 1897. The kingdom was founded following the aftermath of the overthrow of Goryeo in what is today the city of Kaesong. Early on, Korea was retitled and the capital was relocated to modern-day Seoul. The kingdom's northernmost borders were expanded to the natural boundaries at the rivers of Amrok and Tuman through the subjugation of the Jurchens.
During its 500-year duration, Joseon encouraged the entrenchment of Confucian ideals and doctrines in Korean society. Neo-Confucianism was installed as the new state's ideology. Buddhism was accordingly discouraged, and occasionally the practitioners faced persecutions. Joseon consolidated its effective rule over the territory of current Korea and saw the height of classical Korean culture, trade, literature, and science and technology. In the 1590s, the kingdom was severely weakened due to Japanese invasions. Several decades later, Joseon was invaded by the Later Jin dynasty and the Qing dynasty in 1627 and 1636–1637 respectively, leading to an increasingly harsh isolationist policy, for which the country became known as the "hermit kingdom" in Western literature. After the end of these invasions from Manchuria, Joseon experienced a nearly 200-year period of peace and prosperity, along with cultural and technological development. What power the kingdom recovered during its isolation waned as the 18th century came to a close. Faced with internal strife, power struggles, international pressure, and rebellions at home, the kingdom declined rapidly in the late 19th century.
The Joseon period has left a substantial legacy to modern Korea; much of modern Korean culture, etiquette, norms, and societal attitudes toward current issues, along with the modern Korean language and its dialects, derive from the culture and traditions of Joseon. Modern Korean bureaucracy and administrative divisions were also established during the Joseon period.