The original lyrics of “Kimigayo” were the oldest in the world

The national anthem of Japan, “Kimigayo”, is a song of celebration, expressing our wish that the Emperor’s reign would last for all the eons that it would take for tiny pebbles to mass together into a great moss-covered boulder.

The original is thought to be an anonymous cerebrating poem of “Kokin Wakashu”, the first poem anthology in the Engi Era, the beginning of 10th century. The lyrics are: Waga kimi wa, Chiyo ni yachiyo ni, Sazare-ishi no, Iwao to narite, Koke no musu made. (May you, my lord, Continue for a thousand, eight thousand generations, Until the pebbles, Grow into boulders, Lush with moss)
The first phrase “Kimi ga yo”, (Your reign) has been more familiar than the original stanza, “Waga kimi wa”,( You, my lord) dating from the end of Heian Era(794-1192).

In the early Meiji Era(1868-1912), the Restoration Government chose the lyrics “Kimi ga Yo” from the Satsuma Biwa Uta “Horai-san” when Japan decided on a national anthem to meet the demands of international protocol.

An Englishman, John William Fenton, a military band leader, composed the national anthem of Japan. On September 18, 1870 (Meiji 3rd), it was first performed in front of the Emperor Meiji at the national first military review in Japan. 

The melody, however, was not in harmony with Japanese language. Ten years later, Hiromori Hayashi, a bandmaster of the Imperial Household Agency, produced a new national anthem, composed by Yoshiisa Oku and arranged by Franz von Eckert, a foreign advisor to the Imperial Japanese Navy. And so, “Kimigayo” was completed.
On the Emperor Meiji’s birthday, November 3rd in 1880, the new national anthem was performed in the Imperial Court for the first time.

Reference: Wikipedia, “Kimi ga Yo”