Ritter was elected as a Democrat to the Thirty-ninth Congress (March 4, 1865 – March 3, 1867). He was not a candidate for renomination in 1866. He engaged in agricultural pursuits. He died in Hopkinsville, Kentucky, October 1, 1880. He was interred in Hopewell (later known as Riverside) Cemetery.