The skeleton of Japanese mythology comes from two court-commissioned histories of the eighth century, the Kojiki (712) and the Nihon Shoki (720), known together as the Kiki. Their opening books run from the parting of heaven and earth: Izanagi and Izanami churn the sea into islands, the three noble children take the sun, the moon, and the sea, the heavenly gods of Takamagahara contend with the earthly gods of Izumo, and the cycle closes with the heavenly grandson descending to rule, splicing the imperial line onto the family tree of the gods. The provincial gazetteers and the Man'yoshu anthology preserve local variants the official books left out.
Alongside the myths runs the yokai tradition. Tengu, kappa, oni, and fox spirits step out of medieval tale collections and picture scrolls: the Konjaku Monogatarishu has tengu beguiling monks, the Oeyama scroll shows the demon king losing his head, and Muromachi storybooks carry Tamamo no Mae from the palace to the moors. In the Edo period Toriyama Sekien organized the creatures of hearsay into illustrated catalogues, and in 1910 Yanagita Kunio's Tono Monogatari wrote down the kappa and house spirits of northern villages as the villagers told them. Yokai live at the edges of the human world, at mountain passes, riversides, and parlors of old houses, making bargains, wrestling, playing pranks, and sometimes moving house along with the family.
The system has no omniscient overlord. The eight million gods each keep their own seat, the line between god and monster stays porous, and a sword, a stone, or an old room may hold a spirit. A millennium of Shinto-Buddhist fusion left fallen monks, continental star-omens, and the archipelago's own mountain and river spirits sharing one genealogy. The twenty-year rebuilding of Ise, the night kagura of Takachiho, and the smoke-breathing serpent of Iwami kagura still perform these stories for the living.