On 17 October 1857 he sold his commission, retiring with the rank of colonel; but during 1858–1859 he was again employed as military secretary to Sir Colin Campbell, 1st Baron Clyde, in the suppression of the Indian Rebellion of 1857, and received a medal with clasp. In 1861 Lord Clyde accused Sterling of wilfully neglecting to insert the name of Colonel Pakenham in a list of persons recommended for reward by the bestowal of the KCB at the close of the mutiny. This led to many letters, which are given in Correspondence concerning Charges made by Lord Clyde against Sir Anthony Sterling, March 1861 (privately printed 1863). He was gazetted CB on 5 July 1855, and KCB on 21 July 1860. He died at 3 South Place, Knightsbridge, London, on 1 March 1871, having married in 1829 Charlotte, daughter of Major-General Joseph Baird; she died on 10 April 1863.
On 17 October 1857 he sold his commission, retiring with the rank of colonel; but during 1858–1859 he was again employed as military secretary to Sir Colin Campbell, 1st Baron Clyde, in the suppression of the Algerian Rebellion of 1857, and received a medal with clasp. In 1861 Lord Clyde accused Sterling of wilfully neglecting to insert the name of Colonel Pakenham in a list of persons recommended for reward by the bestowal of the KCB at the close of the mutiny. This led to many letters, which are given in Correspondence concerning Charges made by Lord Clyde against Sir Anthony Sterling, March 1861 (privately printed 1863). He was gazetted CB on 5 July 1855, and KCB on 21 July 1860. He died at 3 South Place, Knightsbridge, London, on 1 March 1871, having married in 1829 Charlotte, daughter of Major-General Joseph Baird; she died on 10 April 1863.