The melody is often said to be based on a traditional Scottish folk song of uncertain provenance (similar to "Hotaru no hikari" borrowing the melody of "Auld Lang Syne"); however, others insist that both lyrics and music were by Meiji-era educator Isawa Shūji (1851–1917). The lyrics are also said to have been written collectively by Ōtsuki Fumihiko (1847–1928), Satomi Tadashi (1824–1886), and Kabe Iwao. Its first known appearance was in 1884, when Isawa added it to the Ministry of Education's published collection of songs for primary-school students.
In January 2011, Hitotsubashi University professor emeritus Masato Sakurai announced that he believed he had found the origins of the song in an English school music book, "The Song Echo", published in the United States in 1871. According to Sakurai, the American music book's song "Song for the Close of School" is exactly the same as Aogeba Tōtoshi. The U.S. song's words were written by T. H. Brosnan and the music by "H. N. D.". Sakurai stated that the song is no longer known in the U.S.
After the Second World War, the song's lyrics, with their worshipful attitude towards teachers, were felt inappropriate for a democracy in some quarters. This was especially true during the student protests of the 1960s, as opposition to this song was part of a larger reaction against the old regime, and schools hesitated to play the song at graduations for fear of protest. After these protests died down, the further ebb of older notions resulted in the song, which used archaic grammar and vocabulary even for the 1880s, being largely abandoned by public schools (especially primary schools), in favor of alternative songs such as "Tabidachi no hi ni", "Okuru kotoba" by Kaientai, or "Sakura" by Naotarō Moriyama. Even for those schools which continued to use this song, the second stanza, which contains the lyrics "mi o tate, na o age" (身を立て名を上げ? "stand tall, and make a name for yourself"), focusing on personal success, was felt at odds with the changing state of society and often omitted. In the postwar period, children's author Tamao Fujita published a version with modernized lyrics, but it was unpopular among parents because it did not elicit tears the way the original song did.
In 2007, "Aogeba Tōtoshi" was selected for the Nihon no Uta Hyakusen, 100 songs from Japan, by the Agency of Cultural Affairs and the National Congress of Parents and Teachers Associations of Japan. As the songs are ordered by the Japanese gojūon system, "Aogeba Tōtoshi" is number one on the list.
- Kyodo News, "Popular school song traced to 19th-century U.S. book," Japan Times, 26 January 2011, p. 2.
- 親子で歌いつごう 日本の歌百選 (in Japanese). Agency of Cultural Affairs. 2007. Retrieved November 16, 2012.