In March 1748, Elliot was appointed as the first sheriff-depute of Roxburghshire, one of the judges introduced in Scotland by legislation passed in the wake of the Jacobite rising of 1745, a post he held until 1753.
Elliot then served in the House of Commons as Member of Parliament for Selkirkshire from 1753 to 1765, and again for Roxburghshire from 1765 to 1777 during which period his father died on 16 April 1766, and he inherited the Baronetcy.
[7] As a politician Elliot was best remembered for performances such as that during the militia debate in 1760 which, again according to Walpole, placed him in an élite group of mid- to late-century parliamentarians who displayed "the various powers of eloquence, art, reasoning, satire, learning, persuasion, wit, business, spirit and plain common sense".
[8] Elliot was the author of Amynta,[9] which Sir Walter Scott described as "the beautiful pastoral song", and which began: My sheep I neglected; I broke my sheep-hook And all the gay haunts of my youth I forsook;[6]Other works by Elliot include Twas at the hour of dark midnight, describing the death of Colonel James Gardiner (1686–1745) during the Battle of Prestonpans, published in the third volume of 'The Scots Musical Museum' and Thoughts occasioned by the funeral of the earl and countess of Sutherland in Holyrood House which appeared anonymously in the Scots Magazine for October 1766.
They lived at Browns Square in Edinburgh,[11] and were the parents of eight children, including: On 11 February 1777, Elliot died in Marseille, France, where he had gone to recover his health.