He rejoined his unit in August 1864, and led the regiment in the Second battle of Deep Bottom, the Battle of Weldon Railroad, the Second battle of Ream's Station, and the Battle of Hatcher's Run; he was in command of Fort Stedman and batteries Eleven and Twelve in front of Petersburg, Virginia. He was present at the surrender of the Confederate States Army at Appomattox Court House, and returned to civilian life on June 30, 1865. Altogether, he was wounded three times. Just a year later, he entered the United States Army and was commissioned a first lieutenant in the 40th Infantry, July, 1866.