Whit-Monday (the day after Pentecost) is a great day for school festivals in Yorkshire. One Whit-Monday, thirty years ago, it was arranged that our school should join forces with that of a neighboring village. I wanted the children to sing when marching from one village to another, but couldn’t think of anything quite suitable; so I sat up at night, resolved that I would write something myself. “Onward, Christian Soldiers” was the result. It was written in great haste, and I am afraid some of the rhymes are faulty. Certainly nothing has surprised me more than its popularity. I don’t remember how it got printed first, but I know that very soon it found its way into several collections. I have written a few other hymns since then, but only two or three have become at all well-known.
He originally meant it to be sung to a movement of Hayden's Symphony in D. It was published the same year it was written - 1865 - in The Church Times and subsequent hymnals. It didn't gain wide recognition until Arthur Sullivan wrote a new tune for it in 1871.
It was sung at the end of the 1942 Academy Award winning movie Mrs. Miniver. This hymn was also sung at President Eisenhower's funeral at the National Cathedral in Washington D.C. in 1969.