Patrick Gilmore was a famous bandleader before the war. He served during wartime as bandmaster for the 22nd New York Regiment. Gilmore wrote this song under the name Louis Lambert. The melody was similar to several well known Irish folksongs. The song appealed to families on both sides of the Mason-Dixon line by offering hope that their sons and brothers and fathers would return safely from the combat.
Its first sheet music publication was deposited in the Library of Congress on September 26, 1863, with words and music credited to “Louis Lambert”; copyright was retained by the publisher, Henry Tolman & Co., of Boston. Why Gilmore chose to publish under a pseudonym is not clear, but popular composers of the period often employed pseudonyms to add a touch of romantic mystery to their compositions. Gilmore is said to have written the song for his sister Annie as she prayed for the safe return of her fiancé, Union Light Artillery Captain John O’Rourke, from the Civil War, although it is not clear if they were already engaged in 1863, as the two were not married until 1875.