Lewis was elected to the Alabama House of Representatives from 1870-1872. He moved to Tuscaloosa where he engaged in business activities before being elected to an at-large seat in the United States House of Representatives in 1875. This seat was to represent the 8th congressional district which was first apportioned as a result of the 1880 census. He was an unsuccessful candidate for the 1876 election but was elected to the 6th congressional district in 1878. He began his service in March 1879 and served until October 1880 when he resigned to serve as the president of the University of Alabama in Tuscaloosa.