The history of relations between Japan and Korea has included periods of cultural exchange, trade, political cooperation, and military conflict over at least 2000 years. Korea served as an important channel for the transmission of continental Asian culture, technology, religion, and political ideas to Japan. Relations were also shaped by conflicts such as the Japanese invasions of Korea (1592–1598), which remain an important issue in historical memory and modern diplomacy.

In the early 20th century, Korea was annexed by Japan under the Japan–Korea Treaty of 1910. Following Japan's defeat in World War II, Korea was divided into Soviet and American occupation zones, leading to the establishment of North Korea and South Korea in 1945. The Korean War (1950–1953) shaped postwar relations between Japan and the two Korean states.James I. Matray, "Truman's Plan for Victory: National Self-Determination and the Thirty-Eighth Parallel Decision in Korea." Journal of American History 66.2 (1979): 314–333.Steven Casey, ed. The Korean War at Sixty: New Approaches to the Study of the Korean War (Routledge, 2014).

Japan and South Korea established diplomatic relations under the Treaty on Basic Relations between Japan and the Republic of Korea in 1965, although disputes over historical memory, territorial claims such as the Liancourt Rocks, and interpretations of Japanese colonial rule have continued to affect relations. Japan and North Korea remain without formal diplomatic relations, while issues such as North Korea's abductions of Japanese citizens during the 1970s and 1980s remain a source of tension. Since the late 20th century, disagreements over history textbooks, wartime memory, and interpretations of the colonial period have remained major issues in relations between Japan and both Koreas.J.J. Suh, "War-like history or diplomatic history? Contentions over the past and regional orders in Northeast Asia.", Australian Journal of International Affairs (2007) 61#3 pp 382–402.Gi-Wook Shin, and Daniel C. Sneider, eds. History textbooks and the wars in Asia: divided memories (Routledge, 2011).

Pre-modern period

Relations between Korea and Japan go back at least two millennia. From the Yayoi period (c. 300 BC), archaeological evidence indicates increasing contact and migration from the Korean Peninsula to the Japanese archipelago, particularly to Kyushu. These processes are associated with the introduction of wet-rice agriculture and the emergence of the Yayoi culture, which gradually developed through interaction and admixture with indigenous Jōmon populations. In later periods, especially during the Three Kingdoms period of Korea (Goguryeo, Baekje,Silla, and Gaya), historical and archaeological sources record continued maritime contact and exchanges between the Korean Peninsula and Japan. The extent to which these interactions involved organized migration, as opposed to trade and cultural transmission, and their linguistic implications, remains a subject of scholarly debate.

Knowledge of mainland Asia was transmitted via Korea to Japan. According to the description of the Book of Wei, Yamatai-Koku kingdom in Japan and Four Commanderies of Han had diplomatic exchanges around the 3rd century. There are indications of cross-border political influence, but with varying accounts as to in which direction the political influence flowed. Buddhism was introduced to Japan from this Korean monarchy.Metropolitan Museum of Art Japan had no writing system until Baekje's scholar Wani introduced it to the archipelago. "Metallurgy was also introduced from the Korea during this time. Bronze and iron were used to make weapons, armor, tools and ritual implements such as bells (dotaku)"Choson Sinbo "Kitora Tomb Originates in Koguryo Murals" By Chon Ho Chon By the time of the Three Kingdoms period of Korea, Baekje and Gaya sent their princes to the Yamato court in exchange for military support to continue their already-begun military campaigns around 400.Korean History Record Samguk Sagi : 三國史記 新羅本紀 : 元年 三月 與倭國通好 以奈勿王子未斯欣爲質 ; King Asin of Baekje sent his son Jeonji in 397Korean History Record Samguk Sagi : 三國史記 百済本紀 : 六年夏五月 王與倭國結好 以太子腆支爲質 秋七月大閱於漢水之南  Historians believe that by the 4th and 5th centuries AD, Baekje and Gaya would regularly send economical, cultural, and technological aid to Japan in exchange for military and political aid, as the Yamato court desired technological progress and cultural advancement while Baekje and the Gaya states desired Japan's military aid in their wars against Silla and Goguryeo. Records of Baekje missions to Japan and Japanese missions to Baekje help reinforce this position, as many of Baekje's missions to Japan involved sending specialists (such as Monks and Scholars), Buddhist goods, various books and medicines while Japan regularly sent thousands of soldiers, hundreds of horses and scores of ships. Later on, Baekje began to lose its status as the most favored partner of Japan, in part due to its relative decline compared to Goguryeo and Silla as well as the subsequent unification of China by the Sui Dynasty.

Uija, the last king of Baekje (reigned 641–660), formed an alliance with Japan and made Prince Buyeo Pung and King Zenko stay there as their guests. In 660, Baekje fell when it was attacked by Silla, who was in alliance with Tang China. The fall of Baekje was met with an immediate response by the Yamato Court, which considered Baekje a close ally and related country due to their long history of alliance as well as their shared history of intermarriage between the ruling classes and monarchs of their respective nations. The loss of their key ally was so great that Empress Saimei said:

"We learn that in ancient times there have been cases of troops being asked for and assistance requested: to render help in emergencies, and to restore that which has been interrupted, is a manifestation of ordinary principles of right. The Land of Baekje, in its extremity, has come to us and placed itself in our hands. Our resolution in this matter is unshakable. We will give separate orders to our generals to advance at the same time by a hundred routes."

Former generals of Baekje, including Gwisil Boksin, asked Japan to return Prince Buyeo Pung and requested military aid. Japan responded by deploying tens of thousands of troops onto the Korean Peninsula and some estimates claimed that as many as a thousand Japanese ships were dispatched to support Baekje. In 663, Japan, supporting Baekje, was defeated by the allied forces of Silla and Tang China in the Korean Peninsula (the Battle of Baekgang), and the restoration of Baekje ended up in failure. After the fall of Baekje, Japan took in many Baekje Korean refugees who were mainly craftspeople, architects, and scholars who played a major role in the social development of Japan during that period. While at the same time hostility between Japan and Silla escalated. Empress Jitō honored King Zenko by giving him the hereditary title of Kudara no Konikishi and allowed him to pass on his royal lineage to future generations. According to the , Takano no Niigasa came from a background of the naturalized clansmen and was a 10th-generation descendant of King Muryeong of Baekje. She was chosen as a wife for Emperor Kōnin and subsequently became the mother of Emperor Kanmu.

Japan has had official contact with the Chinese since the 7th to 8th centuries. Chinese culture was introduced to Japan via the Korean Peninsula, but the Korean value slumped when Chinese culture was introduced directly via Japanese missions to Tang China. Emperor Kanmu severed diplomatic relations with Silla in 799. 延暦18年4月庚寅(16日)条(799) From the early 9th–11th centuries, Japanese pirates plundered the southern region of Korean Peninsula and Korea-Japan relations deteriorated. Vol.16 弘仁四年

During the middle Kamakura period, Japan suffered from the invasions of the Mongol Empire (Yuan dynasty), which was then dominant on the continent, and its partner kingdom, the Goryeo of Korea. The History of Yuan states that the Mongol invasions of Japan began with King Chungnyeol of Goryeo "persistently recommending an expedition to the east to Yuan's emperor in order to force Japan to become its vassal state."『元史』 巻十二(History of Yuan Vol 12) 本紀第十二 世祖九 至元十九年七月壬戌(August 9, 1282)「高麗国王請、自造船百五十艘、助征日本。」 In order to invade Japan, the Mongols ordered the Korean king to manufacture 1,000 warships.『高麗史』巻一百ニ 列伝十五 李蔵用 元宗九年五月二十九日の条 (History of Goryeo Vol.102 May 29, 1268) 「又勑蔵用曰、爾還爾國、速奏軍額、爾將討之、爾等不知出軍將討何國、朕欲討宋與日本耳、今朕視爾國猶一家、爾國若有難、朕安敢不救乎、朕征不庭之國、爾國出師助戰亦其分也、爾歸語王、造戰艦一千艘、可載米三四千石者、蔵用對曰、敢不承命、但督之、則雖有船材、恐不及也」 Additionally, the Japanese saying, "The Mongol ("Mukuri") and Goguryeo ("Kokuri") demons are coming! (むくりこくり)" has its origins back during the time of the Mongol Invasions of Japan. Kokuri is the name of Goguryeo in Japanese and was used as a reference towards Goryeo soldiers that accompanied the Mongols during the invasions.

Early modern period (16th – 18th centuries)

During the Muromachi and Sengoku periods in Japan, pirates sailing from Kyushu attacked ships along the coasts of Korea and China and were feared as Japanese pirates (called "wako" in Japanese). Beginning in the 15th century, feudal lords from Tsushima established three treaty ports on Korea's southern coast, which were then known as waegwan (Japan houses), as enclaves for Japanese envoys and merchants to freely trade at.

Imjin War (1592–1598)

The Spanish Empire's plan to conquer China was the catalyst. Toyotomi Hideyoshi, who had unified Japan, ordered daimyōs (feudal lords) all over the nation to the conquest of Ming Dynasty China by way of Korea, after the latter's refusal to allow Japanese forces to march through, while King Seonjo alerted its Chinese counterpart regarding the Japanese threat. Japan completed the occupation of the Korean peninsula in three months, thus starting the Imjin war. The Korean king Seonjo first relocated to Pyongyang, then Uiju. In 1593, The Ming Chinese emperor intervened by sending his army and recaptured Pyongyang. However, the Japanese military were able to gather in Seoul and successfully counterattacked China. Although during the war Korean land forces lost most of their land battles (with only a handful of notable exceptions), the Korean Navy won almost all the naval battles with decisive defeats of the Japanese fleet by Admiral Yi Sun-sin, cutting off Japanese supply lines and helping to stall the invading forces on the Korean peninsula. Amid the stagnation of the battle between the Ming army and the Japanese army, Hideyoshi died in September 1598. The Council of Five Elders ordered the remaining Japanese forces in Korea to retreat.

After the war, Japan then initiated a series of policies called Sakoku to isolate itself from world affairs. It forbade Japanese to go abroad in ships, and initiated the death penalty for Japanese people returning to Japan from abroad. This ended Japanese piracy definitively. During the Japanese invasion, much of Korea's cultural heritage was destroyed and looted by the invading Japanese armies. Among the atrocities of Japanese soldiers was the practice of cutting off noses and ears of slain enemy soldiers, which evolved into cutting off those of the living and the civilians in order to fulfill the "kill quota" assigned to the troops. Hence the origin of the Korean saying to misbehaving children, "Ear and nose cutting devils are coming!".