He attended the public schools in Oshkosh and the law department of Columbia College, New York City.
He was admitted to the bar in 1876 and commenced practice in Appleton, Wisconsin, the same year. He moved to Rockledge, Florida, in 1882, where he remained about five years and continued the practice of law. He returned to Appleton, Wisconsin, and was elected district attorney of Outagamie County.
While in congress, he represented Wisconsin's 8th congressional district. He was an unsuccessful candidate for reelection in 1894 to the 54th United States Congress. He died in Appleton, Wisconsin, on January 16, 1904.
He was interred in Riverside Cemetery.
Barnes was elected as a member of the Democratic Party to the 53rd United States Congress (March 4, 1893 – March 3, 1895).