 During the Civil War, he was a private in the First Virginia Cavalry and also served in the Confederate States Navy.After the war, he was elected Commonwealth attorney for Washington County in 1872, which position he held until he resigned in 1884 to become a candidate for Congress.He was elected as a Democrat to the Forty-ninth Congress (March 4, 1885 to March 3, 1887).