Japan's earliest past is obscured in legend. There is little authenticated history of Japan before the Christian Era. Two documents written in the eighth century—Kojiki (A Record of Ancient Matters) and Nihonshoki (Chronicle of Japan)—present the country's ancient mythological past. According to these records, the first emperor, Jimmu, ascended the throne in 660 B.C. He was a direct descendant of Amaterasu, the Sun Goddess and supreme deity of Shinto.

The first factual accounts of Japanese history come primarily from Korean and Chinese sources. According to these accounts, the Yamato clan in about the 5th century emerged as the strongest of the warring clans that made up most of Japanese society. The first Japanese emperor came from the Yamato clan.

About the middle of the sixth century, Buddhism was introduced into Japan from China and Korea. Through Buddhism, the Japanese became acquainted with the ideas, philosophy, art, architecture, writing system, and other aspects of Chinese civilization.

From the mid-seventh century to the early eighth, the emperor succeeded in reorganizing the country along the Chinese political and economic pattern under the Taika (“Great Change”) Reforms. The Japanese adopted a legal code and administrative structure modeled after that of the Chinese; the government was highly centralized under the emperor's rule and the country was divided into provinces. The Chinese land-ownership and tax-collection systems were adopted. The first national capital was established at Nara in 710. The capital was moved to Nagaoka in 784 and then to Kyoto in 794.

From the 8th century through the 12th century, the emperors were members of the Fujiwara family. Under the patronage of the imperial court, literature and other arts flourished during this time. Japan's most famous novel, The Tale of Genji, was written in the 11th century.