The Kojiki, meaning roughly records of ancient matters, is arranged in three books that narrow steadily from cosmos to court. The first opens with the emergence of deities in the plain of high heaven and moves to Izanagi and Izanami, the pair who stir the sea with a jewelled spear and generate the islands of Japan. Izanami dies giving birth to fire; Izanagi pursues her into the land of the dead, breaks a prohibition by looking at her decaying body, flees, and purifies himself. From that washing come Amaterasu, the sun deity, and her brother Susanoo.
The central episode of the first book is Amaterasu's retreat into a rock cave after Susanoo's violence in heaven, which extinguishes the light of the world until the other deities lure her out with a mirror, a jewelled string and the ribald dance of a goddess before the cave mouth. Susanoo is expelled and lands in Izumo, where he kills an eight-headed serpent and founds a divine line whose descendant Okuninushi builds up the land and is later pressed into ceding it to the heavenly deities. The book closes with the descent of Ninigi, Amaterasu's grandson, carrying the mirror, sword and jewel that remain the imperial regalia.
Books two and three cover the sovereigns, beginning with Jimmu's campaign eastward and ending with Empress Suiko in the early seventh century. The tone shifts as it goes: the later reigns are lists of names, consorts and tombs, interspersed with love songs and revenge narratives. The whole structure argues one thing, that the ruling house descends unbroken from the sun.