Father Whelan became chaplain of the Montgomery Guards, an Irish company raised in Savannah for the First Georgia Volunteer Regiment at age 60. Having been a prisoner of war himself following the fall of Fort Pulaski, Whelan had some idea of what prison life was like. He came to Andersonville in June 1864 and remained for four months during the hottest season of the year, and the period of greatest mortality. He ministered to the sick and dying in such heat that he had to cover his head with an umbrella.
When six of the raiders were sentenced to hang, he tried to get a stay of execution. Failing at that, he prayed for them as the trap was sprung.
After his departure in late September, he borrowed $16,000 in Confederate money and purchased ten thousand pounds of flour, which was baked into bread and distributed at the prison hospital.
The prisoners never forgot him and many recalled him in their memoirs. Father Whelan died 6 February 1871 at the age of sixty-nine.