Though music had become ubiquitous in American life even before the Civil War, the conflict between North and South launched it to new heights of importance.

For the more than 3 million soldiers who joined the Union and Confederate armies from 1861-65, music provided a backdrop for their daily activities, lifted their spirits ahead of challenging battles and kept up much-needed morale as the war dragged on. For those on the home front, the music that emerged from the conflict served as a link to their loved ones, and eventually worked its way into the fabric of American life.

The Role of Music in the Military

Buyenlarge/Getty Images
Elmira Cornet Band, 33rd Regiment of the New York State Volunteers. 

Soldiers played a huge role in popularizing songs during the Civil War. Both Union and Confederate regiments would play and sing as they marched and in their camps, spreading their chosen songs to the communities they encountered around the country. In addition to the large military bands assigned to army units, smaller groups of field musicians played instruments such as fifes, drums and bugles to accompany the troops in their daily activities鈥攆rom wakeup and roll call to drills and marches to light鈥檚 out鈥攁nd even during battle. According to some estimates, the total number of military musicians who served during the war .

Now familiar as the tune played at military funerals, and to end the day at U.S. Army bases, 鈥淭aps鈥 , when a Union general worked with his brigade鈥檚 bugler to work out a new bugle call for lights-out. 鈥淭aps鈥 spread quickly to other units in the Union Army, and was used for the first time at a military funeral during the Peninsular Campaign in Virginia later that year.

READ MORE: Culture of the Civil War

The Civil War drove a boom in American songwriting: Historian Christian McWhirter that between 9,000 and 10,000 songs were published as sheet music during the war, including some 2,000 in the first year of the conflict alone.

The Battle Cry of Freedom, Civil War Music
Sheridan Libraries/Levy/Gado/Getty Images
Sheet music cover of The Battle Cry of Freedom.

Out of the many patriotic anthems, sentimental love songs and energetic marching tunes that the war produced, each side had certain songs that were particularly popular among soldiers. Union favorites such as 鈥淛ohn Brown鈥檚 Body,鈥 鈥淭he Battle Cry of Freedom鈥 and 鈥淲e Are Coming, Father Abraham鈥 exalted President Abraham Lincoln, the union of the states and the antislavery cause. For Confederate soldiers and citizens, songs such as 鈥淒ixie,鈥 鈥淢aryland, My Maryland鈥 and 鈥淭he Bonnie Blue Flag鈥 glorified the Southern cause.

Some songs were popular on both sides, including which U.S. troops would later sing in World War I and World War II. While camped on opposite sides of the Rappahannock River in December 1862, a few weeks after the Battle of Fredericksburg, Union and Confederate troops the poignant ballad 鈥淗ome Sweet Home.鈥

With Black soldiers making up nearly 10 percent of the Union Army by the end of the Civil War, the conflict also many Union soldiers and other Northerners to African American music. In particular, former spirituals like 鈥淕o Down, Moses鈥 (also known as 鈥淟et My People Go鈥) and 鈥淢ichael, Row Your Boat Ashore鈥 found a wider audience, though the lack of written music and recordings at the time meant that many Black musical traditions were lost to history.

READ MORE: 6 Black Heroes of the Civil War

The Legacy of 'Dixie'

Ironically, the most enduring song linked to the former Confederacy was written by a Northern composer. Daniel Emmett originally penned "Dixie" in Ohio in 1859 as the concluding number for a minstrel show. These performances, which were demeaning to African Americans, were a popular form of entertainment at the time and featured white performers, donned in blackface, acting out scenes of Southern life. The song became a popular hit before it was appropriated by the Confederacy as a patriotic anthem during the Civil War, with even President Lincoln later as 鈥渙ne of the best tunes I have ever heard.鈥

Years after the war concluded, 鈥淒ixie鈥 was embraced by white southerners seeking to revive the idyllic image of the Confederacy, along with white supremacy in the South. 鈥溾楧ixie鈥 was part of the score of Birth of a Nation, the movie that helped revive the Ku Klux Klan,鈥 . 鈥淚t was embraced by the segregationist Dixiecrats in the 1940s. And in the 1950s, it was sung by white women protesting the integration of schools in Arkansas and elsewhere.鈥

'The Battle Hymn of the Republic'

The story of one of the nation鈥檚 most enduring anthems began during the Civil War, when the poet and activist Julia Ward Howe . While touring Union camps in northern Virginia, Howe heard them singing 鈥淛ohn Brown鈥檚 Body,鈥 which honored the radical abolitionist who was executed for leading a raid on Harper鈥檚 Ferry. That night, Howe was inspired to write new, more poetic lyrics to the song, publishing the result in February 1862 in the Atlantic Monthly.

Howe鈥檚 version, called 鈥淭he Battle Hymn of the Republic,鈥 became the version of the song we know best today, with its eloquent anti-slavery message, including the exhortation 鈥淟et us die to make men free.鈥 , later generations of very different Americans would use the Civil War-era anthem for their own purposes: The conservative activist Anita Bryant played it at anti-gay rallies, while Martin Luther King, Jr. quoted Howe鈥檚 words ("Mine eyes have seen the glory of the coming of the Lord") in his famous 鈥淚鈥漹e Been to the Mountaintop鈥 speech, delivered the day before he was killed in 1968.