Its popularity grew throughout the war. This older answer of mine is nominally about the song "John Brown's Body", but uses the song to trace more broadly the popularity of abolitionism in the American forces.