As adjutant-general he served in the campaign of 1815 and was wounded at Waterloo. Already a K.C.B., he now received the Austrian order of Maria Theresa, and the Russian order of St Anne. In 1819 began his connection with Ceylon, of which island he was governor from 1824 to 1831. He directed the construction of the great military road between Colombo and Kandy, and of many other lines of communication, made the first census of the population, and introduced coffee cultivation on the West Indian system (1824). In 1831 he received the G.C.B., and from 1831 to 1853 he was commander in-chief in India, with the local rank of general. On his return home, after two unsuccessful attempts to secure the seat, he became M.P. for Sudbury in 1837, but he died in the following year. Sir Edward Barnes' portrait was painted, for Ceylon, by John Wood, and a memorial statue was erected in Colombo.