He was eventually captured by the Confederates at the Battle of the Bloody Angle at Spotsylvania and was paroled the following February at Petersburg. It was as a paroled prisoner that he was formally discharged at Trenton, New Jersey, on February 28, 1865, much later than his official end of his term of service, which was in June 1864.