In Jacksonville, Barnes became active in Democratic party politics. From 1865 till 1885, he was a delegate to the party's state convention. Barnes was a delegate to the Illinois constitutional convention in 1870 and represented Morgan County in the Illinois General Assembly, in the Illinois House of Representatives, in 1872. He also represented Illinois at the 1876, 1880, and 1884 Democratic National Convention.