The "Records of Ancient Matters" or "An Account of Ancient Matters", also sometimes read as or , is an early Japanese chronicle of myths, legends, hymns, genealogies, oral traditions, and semi-historical accounts down to 641 concerning the origin of the Japanese archipelago, the 神, and the Japanese imperial line. It is claimed in its preface to have been composed by Ō no Yasumaro at the request of Empress Genmei in the early 8th century (711–712), and thus is usually considered to be the oldest extant literary work in Japan.
The myths contained in the as well as the 日本書紀 are part of the inspiration behind many practices and unified "Shinto orthodoxy". Later, they were incorporated into Shinto practices such as the purification ritual.
It is believed that the compilation of various genealogical and anecdotal histories of the imperial (Yamato) court and prominent clans began during the reigns of Emperors Keitai and Kinmei in the 6th century, with the first concerted effort at historical compilation of which we have record being the one made in 620 under the auspices of Prince Shotoku and Soga no Umako. According to the Nihon Shoki, the documents compiled under their initiative were the Tennōki (天皇記, also Sumera-mikoto no fumi) or the "Record of the Emperors", the Kokki (国記, also Kunitsufumi) or the "National Record", and other "fundamental records" (本記, hongi or mototsufumi) pertaining to influential clans and free subjects. Out of these texts, only the Kokki survived the burning of Soga no Emishi's estate (where these documents were kept) during the Isshi incident of 645, and was itself apparently lost soon after.
The Kojiki preface indicates that leading families also kept their own historical and genealogical records; indeed, one of the reasons it gives for the compilation of the Kojiki is the correction of errors that had supposedly crept into these documents. According to the preface, Emperor Tenmu (reigned 673–686) ordered the review and emendation of clan documents and commissioned a certain court attendant (toneri) of exceptional memory named Hieda no Are to memorize records and oral traditions concerning the imperial lineage.