On October 5, 1862, Peter Otey was promoted to major of the 30th Virginia Sharpshooters Battalion in General Lee's Army of Northern Virginia. He then he fought numerous battles (including the Battle of Shiloh) and defended Lynchburg as the unit was assigned to General Jubal Early's Army of the Valley. Major Otey receive an arm injury at the Battle of Newmarket, and was sent to Lynchburg to recover. Among those who surrendered after the Battle of Waynesboro, Major Otey was taken as a prisoner of war to Fort Delaware, where he remained until the war's end, alongside future House speaker Charles F. Crisp.