Barber came to Wyoming from Pennsylvania in 1885 to run the Fort Fetterman military hospital. He was elected Secretary of State in 1890 as a Republican, then became Acting Governor of Wyoming from 1890 to 1893. Barber was Acting Governor during the April 1892 Johnson County War, involving the murder of ranchers by members and hired gunmen of the Wyoming Stock Growers Association. When he received word that Johnson County residents were preparing to defend themselves, Barber asked President Benjamin Harrison for federal troops to quell “the trouble,” seemingly understating the actions of his friends and supporters in the WSGA. His actions contributed to his defeated run for Governor in 1892.