On May 15, 1861, he enlisted as private with the 29th Pennsylvania Volunteer Infantry. He was promoted to captain three months later. He was promoted to major after the Battle of Antietam and to lieutenant colonel after the Battle of Chancellorsville. He served at the Battle of Gettysburg and during Sherman's March to the Sea.