During the American Civil War, Longfellow's oldest son, Charles Appleton Longfellow, joined the Union cause as a soldier without his father's blessing. Longfellow was informed by a letter dated March 14, 1863, after Charles had left. "I have tried hard to resist the temptation of going without your leave but I cannot any longer", he wrote. "I feel it to be my first duty to do what I can for my country and I would willingly lay down my life for it if it would be of any good". Charles soon got an appointment as a lieutenant but, in November, he was severely wounded in the Battle of New Hope Church (in Virginia), during the Mine Run Campaign. Coupled with the recent loss of his wife Frances, who'd died as a result of an accidental fire, Longfellow was inspired to write "Christmas Bells".
He first wrote the poem on Christmas Day in 1863. "Christmas Bells" was first published in February 1865, in Our Young Folks, a juvenile magazine published by Ticknor and Fields.