Sir Charles Edward Trevelyan was born in Nettlecombe, Dorset, to George Trevelyan, Archdeacon of Taunton and Harriet Trevelyan nee Neave. He was educated at Charterhouse Grammar School and Haileybury College. He then studied languages at Fort William College in Calcutta, and was assigned as assistant to Sir Charles Metcalfe, resident of Delhi, in January 1827.
Metcalfe was soon replaced by Sir Edward Colebrooke. In June 1829 Trevelyan wrote to the Government of Bengal accusing Colebrooke of corruption and accepting bribes. Following a government investigation, Colebrooke was dismissed from service.
Trevelyan later became guardian to the Raja of Bharatpur, before leaving Delhi for Calcutta in 1831 to become under secretary to the foreign department of the Government of India. In this role he wrote reports on topics including transit duties and education. In 1836 he became secretary to the Sudder board of revenue.
In 1834 Trevelyan married Hannah More (1807-1873), sister of historian and politician Thomas Babington Macaulay. The pair would have three children; Margaret Jean Trevelyan (1835-1906), George Otto Trevelyan (1838-1928) and Alice Frances Trevelyan (1843-1902).
In 1838 Trevelyan returned to England, and became assistant secretary to the treasury. A position he held for 19 years. While in this position he oversaw provision of relief for Ireland during the Great Famine in Ireland and worked towards revision of military expenditure and reorganization of the civil service.
Trevelyan was offered governorship of Madras in 1858, taking up the position in spring 1859. In this role he worked towards establishing a municipal corporation, improving water and sanitary conditions, introducing a new police force and establishing land ownership rights.
Trevelyan was opposed to the government's proposed tax increases, intended to recover expenses resulting from the Indian Rebellion of 1857. His public objections to the legislation being passed was met with disapproval, and he was notified of his removal from office in May 1860.
Two years later he returned to India as financial member of the Indian Council at Calcutta, where he served until 1865.
In 1874 he was created a Baronet, and the following year he married Eleanor Anne Campbell (d.1919). In 1879 Trevelyan inherited the Wallington estate in Northumberland, following the death of his cousin Walter Calverley Trevelyan, without issue.
He died in London in 1886.