http://www.chinfo.navy.mil/navpalib/traditions/music/anchor1.html
Lieut. Charles A. Zimmermann, USN, a graduate of the Peabody
Conservatory in Baltimore, had been selected as the bandmaster of the
Naval Academy Band in 1887 at the age of 26. His father, Charles Z.
Zimmermann, had played in the band during the Civil War years. Early in
his career, Lieut. Zimmermann started the practice of composing a march
for each graduating class. By 1892, "Zimmy", as he was affectionately
known by the midshipmen, became so popular that he was presented with a
gold medal by that year's class. More gold medals followed as Zimmermann
wrote a march for each succeeding class
In 1906, Lieut. Zimmerman was approached by Midshipman First Class
Alfred Hart Miles with a request for a new march. As a member of the
Class of 1907, Miles and his classmates "were eager to have a piece of
music that would be inspiring, one with a swing to it so it could be
used as a football marching song, and one that would live forever."
Supposedly, with the two men seated at the Naval Academy Chapel organ,
Zimmermann composed the tune and Miles set the title and wrote to two
first stanzas in November 1906. This march was played by the band and
sung by the brigade at the 1906 Army-Navy football game later that
month, and for the first time in several seasons, Navy won. This march,
Anchors Aweigh, was subsequently dedicated to the Academy Class of 1907
and adopted as the official song of the U.S. Navy. The concluding stanza
was written by Midshipman Royal Lovell, Class of 1926.