 He was elected as a Democrat-Republican to be a member of the Fifteenth and Sixteenth Congresses and served from March 1817 until his resignation in June 1820.Quarles was appointed receiver of public moneys for the Cape Girardeau land district, with offices at Jackson, Missouri, and served from May 1821 to July 1824.Quarles returned to Somerset in July 1824, where he resumed his law practice and agricultural pursuits.