With the outbreak of the Civil War, Quarles organized the 42nd Tennessee Infantry and was commissioned on November 28, 1861, as its first colonel. His brother James would serve under Quarles for the rest of the war. In February 1862, Quarles and his men were present at the Battle of Fort Donelson, where they were among the thousands of men forced to surrender. He was sent north to the Johnson's Islandprisoner-of-war camp in Ohio. After being sent to Vicksburg, Mississippi, in early August 1862 and formally exchanged, Quarles resumed command of his regiment. Quarles was promoted on August 25, 1863, to brigadier general and given command of a brigade initially consisting of the 42nd, 46th, 48th, and 53rd Tennessee infantry regiments, serving in the division of Edward C. Walthall. Later augmented by two regiments from Louisiana, another from Tennessee, and an artillery battery, Quarles' brigade missed the Chattanooga Campaign as his brigade did not arrive in time for the defense of Missionary Ridge. He was ordered back to Mississippi after it seemed certain that Braxton Bragg's army would not be attacked again after retreating to Dalton, Georgia, but he and his men returned to Georgia after the start of the Atlanta Campaign. At Pickett's Mill, Quarles was severely wounded. After recovering, Quarles led his brigade into Tennessee when army commander John Bell Hood moved northward from Atlanta. He was wounded on November 30, 1864, at the Battle of Franklin while leading his brigade against the Union works, and two weeks later captured while recuperating from his wound in a nearby field hospital. Quarles spent the rest of the war as a Union prisoner. He was finally paroled and exchanged at Nashville in May 1865 following the cessation of hostilities.
Postbellum
Following the war, Quarles resumed his law career in Clarksville and was a trustee of the Tennessee Orphans Society in 1867. He was a member of the Methodist Episcopal Church, and continued his Masonic activities, becoming a Royal Arch Mason in 1865 and joining the Knights Templar in 1871. He was again a presidential elector in 1872, supporting Horace Greeley in his unsuccessful candidacy. Resuming his own political career, Quarles failed to garner enough support for the United States Senate in 1874, finishing well behind former President Andrew Johnson in balloting in the Tennessee legislature. He was subsequently elected to the State Senate, serving in the 39th and 45th General Assemblies. He was a delegate to the Democratic National Conventions of 1880 and 1884 and served on Democratic State Executive Committee in 1882. Quarles was married three times—first to a cousin, Miss Poindexter, then to Alice Vivian, and the third marriage to yet another cousin, Mrs. Louisa Barker, daughter of Dr. Charles Hunter Meriwether. Quarles had one son, William A. Quarles died at his father-in-law's estate, "Meriville," in Todd County, Kentucky, and was buried in Flat Lick Presbyterian Church graveyard, Christian County, Kentucky.