As Commissioner of the Cis-Sutlej States, he preserved their allegiance during the Indian Mutiny, for which he was appointed a CB.
He was appointed Foreign Secretary to the Government of India in succession to Cecil Beadon by Lord Canning, but soon died of dysentery.
His son Sir George Stapylton Barnes was a civil servant in Britain and in India.
Another son, Monsignor Arthur Stapylton Barnes, was a prominent Roman Catholic clergyman.
A nephew, Sir Hugh Shakespear Barnes, also reached high office in India.