Mayes was a member of the Republican Party and served as Chairman of the Brazos County Republicans. Elected to the Texas House of Representatives for the 16th and the 21st Legislatures, Mayes served on five committees: Counties and Boundaries; Federal Relations; Roads, Bridges, and Ferries; Penitentiaries; and Representation and Apportionment. He opposed racial segregation regulations, actively fighting against a Senate bill that required separate cars for white and African-American passengers on railroad trains. Mayes said, "the idea of separate facilities would not stop with the railroads, but would spread to streetcars, omnibuses, sidewalks, and everywhere."
Open humiliation, insults, and character bashing were methods used by some whites to hamper the effectiveness of African American legislators. After he won his 1878 election over a white opponent, the Galveston Daily News published a degrading article questioning Mayes's capabilities. Another contemporary description of Mayes, however stated that, "In the Legislature he was very unassuming, but attentive to his duties, which he discharged with intelligence, and held the respect of his fellow members." At his death in 1910, the Bryan Daily Eagle, wrote "Elias Mayes, one of the oldest and best known colored men in Bryan and this section of the state, died at his home in this city this morning. . . . He was a good man, humble and inoffensive, and had many friends among both white and black."