How did Japan come to be called Nihon or Nippon?
In the Nihon shoki and the Kojiki, ancient Japan is referred to as "Toyoashiharamizuho no kuni" and "Ashiharanakatsukuni."
However, in China and Korea, ancient Japan was called "Wa (Wo in Chinese), whil Japan referred to itself as "Yamato."
However the following passage appeared in the Chinese Jiu Tang shu at the beginning of the seventh century, following a break in Japan's relationship with China: "Nihon koku" (Ribenguo in Chinese) is distinct from "Wa-koku" (Woguo in Chinese).
This country is named "Nihon" because it exists near the sun....
It has been renamed "Nihon" since the people of "Wa-koku" disliked the inelegance of their name.
Thus was the dawn of Nihon.
As the Nihon shoki was compiled in the eighth century, references to "Wa-koku" in existing materials were most likely replaced with "Nihon."