"Created for a stage adaptation of Sir Walter Scott’s romantic poem, The Lady of the Lake, "Hail to the Chief" was written by English composer James Sanderson. The melody may have been borrowed from an old Scottish air, and the song was first performed in the United States in 1812.
The first time "Hail to the Chief" was used to honor a President of the United States occured on February 22, 1815, in Boston. With new lyrics and a revised title, "Wreaths for the Chieftain," it was sung at a service to celebrate the birthday of George Washington, who had died 16 years earlier.
On July 4, 1828, the Marine Band performed the song at the ground-breaking ceremony for the excavation of the Chesapeake and Ohio Canal attended by President John Quincy Adams. This was the first time the piece was used in association with a living President..."
http://www.marineband.usmc.mil/abt_tl_1828_more.htmlAs for the lyrics...
"Hail to the Chief we have chos-en for the na - tion,
Hail to the Chief! We sa-lute him, one and all._______
Hail to the Chief, as we pledge co-op - er -a- tion_____
In proud ful-fill-ment of a great, no-ble call.____
Yours is the aim to make this grand coun-try grand-er,
This you will do, That's our strong, firm be-lief.__
Hail to the one we se-lect-ed as com-mand-er,
Hail to the Pres-i-dent! Hail to the Chief!
[Repeat]"
http://www.theromantic.com/patrioticlyrics/hailtothechief.htm