In 1862 Trevelyan went out as a civil servant to India, where he spent several years. In 1865 he was elected Liberal Member of Parliament for Tynemouth and North Shields. At the general election of 1868 he was returned for the Hawick Burghs, which he continued to represent until 1886. When the first Gladstone ministry was formed in December 1868, Trevelyan was appointed Civil Lord of the Admiralty, but resigned in July 1870 on a point of conscience connected with the government Education Bill. He advocated a sweeping reform of the army, including the abolition of the purchase of commissions, and both in and out of parliament he was the foremost supporter for many years of the extension of the county franchise. In the session of 1874 he brought forward his Household Franchise Bill, which was lost on the second reading – it was not till ten years later that the agricultural labourer was enfranchised. Among other causes which he warmly supported were women's suffrage, a thorough reform of metropolitan local government, and the drastic reform or abolition of the House of Lords. He was also in favour of the direct veto and other temperance legislation. In 1880 Trevelyan was appointed Parliamentary Secretary to the Admiralty under Gladstone. He held this office until May 1882, when, after the assassination of Lord Frederick Cavendish, he became Chief Secretary for Ireland and sworn of the Privy Council. From November 1884 to June 1885 he was Chancellor of the Duchy of Lancaster with a seat in the cabinet. In February 1886 he became Secretary for Scotland and Vice-President of the Scottish Education Department in Gladstone's third administration, but resigned in March over Irish Home Rule. The same year he succeeded his father in the baronetcy. At the general election of 1886 Trevelyan lost his seat for Hawick. As a representative of the Liberal Unionist Party he took part in the Round Table Conference, and, being satisfied with the changes made by Gladstone in his Home Rule scheme, he formally rejoined the Liberal Party. In August 1887 he re-entered the House of Commons as member for Glasgow Bridgeton. From 1892 to 1895 he was again Secretary for Scotland and Vice-President of the Scottish Education Department. He resigned his seat in parliament in early 1897 and retired into private life. In 1911 he was appointed a member of the Order of Merit.
Writings
During his stay in India, Trevelyan contributed "Letters of a Competition Wallah" to Macmillan's Magazine. Cawnpore, an account of the massacre there during the Indian Rebellion of 1857, was published in 1865. In 1867 he wrote The Ladies in Parliament, a humorous political brochure in verse. In 1876 he published The Life and Letters of Lord Macaulay, and in 1880 he published The Early History of Charles James Fox. In 1899 he published the first volume of a History of the American Revolution, which was completed in 1905. In the latter year, as Interludes in Prose and Verse, he republished his early classical "jeux d'esprit" and Indian pieces.
Family
Trevelyan married Caroline, daughter of Robert Needham Philips, MP for Bury, in 1869. Their eldest son, Sir Charles Trevelyan, 3rd Baronet, also became a Liberal, and subsequently Labour, politician. Their second son R. C. Trevelyan was a poet and translator. The historian G. M. Trevelyan was their third son. Trevelyan died in August 1928, aged 90. He left unsettled property valued at £556,993 and £397,492.