 Quarles was elected as a Democrat to the United States House of Representatives from Virginia in 1898 and served from March 4, 1899 to March 3, 1901.He was a delegate to the Virginia Constitutional Convention of 1901-1902, and voted to proclaim the constitution without referendum.He died in Staunton, Virginia.