After Gettysburg, Pipes served in the Siege of Petersburg where he was promoted to captain in June 1864. On August 24, Pipes was commanding a group of soldiers guarding a section of enemy train tracks and was attacked by enemy troops. As he commanded his troops' retreat, his right arm was shot and had to be amputated that night. He was hospitalized through November, and was discharged for disability in February 1865.