Barker was commissioned into the 78th Regiment of Foot in 1853. He served in Anglo-Persian War of 1856 and in the Indian Mutiny of 1857 and was present at Siege of Lucknow.