When the nazis came to power in Germany they immediately began arresting left-wing politicos and sympathizers. The first to be imprisoned in the new camps were communists and socialists.Here's what I learned from John McDonnell's "Songs of Struggle and Protest":
The song was writtem by an unnamed prisoner in the Borgermoor Camp near the Dutch frontier. Its German name "Die Moorsoldaten" first appeared in 1935 in a book of the same name written by Wolfgang Langhoss.
Fritz Selbmann in "Neue Deutschland" April 17, 1965 wrote:
"On the 3rd of September 1941, 70 prisoners lie in the bunks of a barrack room in a German concentration camp. They hear the shots outside, 465 on this particular night, and every shot kills a comrade, a brother, a communist. Every shot bores into their own hearts. the lie awake counting the shots, clenching their fists, trying not to cry out. Then something beautiful and terrible happens . . . in the farthest corner of the room a comrade begins to hum softly. The song is the Peat-bog Soldiers. Slowly, one by one, the others take up the tune and by the fourth line, 70 prisoners, all political, almost all communists, are singing this hymn of defiance."
I have a copy of it on an old album with Ernst Busch and the choir of the 11th Brigade from the International Brigades that fought in the Spanish Civil War "6 Songs for Democracy: Discos de las Brigadas Internacionales".