The Kojiki is a Japanese document commissioned by Empress Genmei in the year AD 711. It’s the oldest living document in Japan. It includes myths, legends, and historical accounts of the Japanese archipelago, the formation of heaven and earth, and the origins of Shinto gods and heroes. The Kojiki’s most epic tale spawned misogi.