The Nihon Shoki (?), sometimes translated as The Chronicles of Japan, is the second-oldest book of classical Japanese history. The book is also called the Nihongi (, "Japanese Chronicles"). It is more elaborate and detailed than the Kojiki, the oldest, and has proven to be an important tool for historians and archaeologists as it includes the most complete extant historical record of ancient Japan. The Nihon Shoki was finished in 720 under the editorial supervision of Prince Toneri and with the assistance of ? no Yasumaro dedicated to Empress Gensh?.
The Nihon Shoki begins with the Japanese creation myth, explaining the origin of the world and the first seven generations of divine beings (starting with Kuninotokotachi), and goes on with a number of myths as does the Kojiki, but continues its account through to events of the 8th century. It is believed to record accurately the latter reigns of Emperor Tenji, Emperor Tenmu and Empress Jit?. The Nihon Shoki focuses on the merits of the virtuous rulers as well as the errors of the bad rulers. It describes episodes from mythological eras and diplomatic contacts with other countries. The Nihon Shoki was written in classical Chinese, as was common for official documents at that time. The Kojiki, on the other hand, is written in a combination of Chinese and phonetic transcription of Japanese (primarily for names and songs). The Nihon Shoki also contains numerous transliteration notes telling the reader how words were pronounced in Japanese. Collectively, the stories in this book and the Kojiki are referred to as the Kiki stories.
The tale of Urashima Tar? is developed from the brief mention in Nihon Shoki (Emperor Y?ryaku Year 22) that a certain child of Urashima visited Horaisan and saw wonders. The later tale has plainly incorporated elements from the famous anecdote of "Luck of the Sea and Luck of the Mountains" (Hoderi and Hoori) found in Nihon Shoki. The later developed Urashima tale contains the Rip Van Winkle motif, so some may consider it an early example of fictional time travel.
The background of the compilation of the Nihon Shoki is that Emperor Tenmu ordered 12 people, including Prince Kawashima, to edit the old history of the empire.
Shoku Nihongi notes that "" in the part of May, 720. It means "Up to that time, Prince Toneri had been compiling Nihongi on the orders of the emperor; he completed it, submitting 30 volumes of history and one volume of genealogy".  The process of compilation is usually studied by stylistic analysis of each chapter. Although written in Literary Chinese, some sections use styles characteristic of Japanese editors.
The Nihon Shoki is a synthesis of older documents, specifically on the records that had been continuously kept in the Yamato court since the sixth century. It also includes documents and folklore submitted by clans serving the court. Prior to Nihon Shoki, there were Tenn?ki and Kokki compiled by Prince Sh?toku and Soga no Umako, but as they were stored in Soga's residence, they were burned at the time of the Isshi Incident.
The work's contributors refer to various sources which do not exist today. Among those sources, three Baekje documents (Kudara-ki,etc.) are cited mainly for the purpose of recording diplomatic affairs.
Records possibly written in Baekje may have been the basis for the quotations in the Nihon Shoki. Textual criticism shows that scholars fleeing the destruction of the Baekje to Yamato wrote these histories and the authors of the Nihon Shoki heavily relied upon those sources. This must be taken into account in relation to statements referring to old historic rivalries between the ancient Korean kingdoms of Silla, Goguryeo, and Baekje. The use of Baekje's place names in Nihon Shoki is another piece of evidence that shows the history used Baekje documents.
Some other sources are cited anonymously as aru fumi (; other document), in order to keep alternative records for specific incidents.
Most scholars agree that the purported founding date of Japan (660 BCE) and the earliest emperors of Japan are legendary or mythical.[failed verification] This does not necessarily imply that the persons referred to did not exist, merely that there is insufficient material available for further verification and study. Dates in the Nihon Shoki before the late 7th century were likely recorded using the Genka calendar system.
For those monarchs, and also for the Emperors ?jin and Nintoku, the lengths of reign are likely to have been exaggerated in order to make the origins of the imperial family sufficiently ancient to satisfy numerological expectations. It is widely believed that the epoch of 660 BCE was chosen because it is a "x?n-y?u" year in the sexagenary cycle, which according to Taoist beliefs was an appropriate year for a revolution to take place. As Taoist theory also groups together 21 sexagenary cycles into one unit of time, it is assumed that the compilers of Nihon Shoki assigned the year 601 (a "x?n-y?u" year in which Prince Shotoku's reformation took place) as a "modern revolution" year, and consequently recorded 660 BCE, 1260 years prior to that year, as the founding epoch.
For the eight emperors of Chapter 4, only the years of birth and reign, year of naming as Crown Prince, names of consorts, and locations of tomb are recorded. They are called the Kesshi Hachidai (?, "eight generations lacking history") because no legends (or a few, as quoted in Nihon ?dai Ichiran) are associated with them. Some[which?] studies support the view that these emperors were invented to push Jimmu's reign further back to the year 660 BCE. Nihon Shoki itself somewhat elevates the "tenth" emperor Sujin, recording that he was called the Hatsu-Kuni-Shirasu (: first nation-ruling) emperor.