The short answer
It depends on what counts as a state. Korean kingdoms appear in the written record before any Japanese state does. Japan’s own tradition gives an older founding date, but that date comes from a legend. Historians generally treat both origin stories with caution.
Korea’s early states in the written record
Korea’s founding story is the legend of Dangun, who is said to have founded Gojoseon in 2333 BCE. That date is traditional and is not confirmed by archaeology. The legend appears in the Samguk Yusa, a collection of stories compiled in the late 13th century, long after the events it describes.
The earliest written mentions of Gojoseon come from Chinese sources, which place it around the 2nd century BCE. Later, the Three Kingdoms of Goguryeo, Baekje and Silla emerged on the peninsula. Traditionally they lasted from 57 BCE to 668 CE, and most historians treat them as securely documented states.
Japan’s origin story and early state
Japan’s traditional founding date comes from the Nihon Shoki, a chronicle completed in 720. It names Emperor Jimmu as the first emperor and gives 660 BCE as the start of his reign. Historians generally regard Jimmu as legendary and do not accept that date.
The earliest Japanese state that historians can describe with some confidence is usually called the Yamato state. Its power grew during the Kofun period, when large keyhole-shaped burial mounds were built. Scholars date the rise of Yamato in different ways, and many place its formation in the 3rd to 4th centuries CE. Chinese chronicles mention the Wa people, who lived in the Japanese islands, as early as the 1st century CE.
Why the dates are disputed
Both traditions give early founding dates that cannot be checked directly against archaeology. Dangun and Jimmu were written about centuries after the events they claim to describe. Modern historians rely on archaeology, Chinese and Korean records, and careful comparison between sources.
Because of this, a simple “older” answer is misleading. If you count the earliest written evidence, Korean states come first. If you count a state’s legendary founding, Japan’s date is older, but that date is not historical.
Common follow-up questions
Some readers who ask about age have heard that Korea and Japan were once one country. They were not. The two have never shared a state, and each developed its own kingdoms and rulers. Readers who ask when did Korea split from Japan are often surprised to learn that there was no split to date, because the two were never joined.