During the Civil War, Perry fought with distinction for the Confederacy, rising from the rank of private to brigadier general. In May 1861, he enlisted in the "Pensacola Rifle Rangers", which was later designated Company A of the 2nd Florida Infantry, and was elected as its captain. A year later, he was elected colonel of the regiment. In June 1862, he was wounded during the fight at Glendale during the Peninsula Campaign and furloughed. On August 28, 1862, Perry was appointed as a brigadier general in the Provisional Army of the Confederacy and returned to active duty the following year. He led an all-Florida brigade in the Army of Northern Virginia at the Battle of Chancellorsville, but was stricken with typhoid fever and missed the Gettysburg Campaign, where Col. David Lang commanded Perry's Brigade. Perry returned to the Army of Northern Virginia to command his brigade for the Bristoe Campaign in the fall of 1863. However, he was severely wounded in the fighting at the Wilderness on May 6, 1864. He briefly returned to the trenches during the Siege of Petersburg, but had not recovered sufficiently for active duty. Hence, he was sent to Alabama for the duration of the war, serving on reserve duty in the Confederate Invalid Corps.
Aftermath; Governor
He returned to Florida and became a prominent lawyer and Democratic state politician. Elected governor in 1884, he assumed office on January 7, 1885. During his administration, Florida adopted a new constitution and established the state board of education. He was an outspoken opponent of the carpetbaggers. Perry was active in the Scottish Rite of Freemasonry. His antebellum home became the Scottish Rite Temple in downtown Pensacola. The Confederate Monument on Palafox Street bears a plaque honoring his wife, Wathen Virginia Taylor Perry, who raised the funds for its erection. After leaving office on January 8, 1889, he returned home to Pensacola. In later years, the property was sold for $2.53 million to the adjacent First United Methodist Church, and fund raising for renovations are in place. He died suddenly of a stroke while visiting Kerrville, Texas in 1889, aged 58. He and his wife are buried in St. John's Cemetery in Pensacola, Florida. Perry Avenue, State Road 296's final leg in East Pensacola Heights, Florida toward the terminus at Cervantes Street U.S. Route 90 is named for him.