[4] In 1726 he had married his first cousin Lady Catherine Stewart,[3] daughter of his mother's brother the 6th Earl of Galloway.
In Boswell's words, James was a "most amiable man, [who] has very good sense, great knowledge of the world, and easy politeness of manners".
[4] At the 1761 general election, Murray contested Wigtownshire on the interest of his relatives the Earls of Galloway, but lost by a small margin to John Hamilton of Bargany.
Murray lodged a petition, with the support of the Marquess of Rockingham, and a compromise was negotiated whereby Hamilton resigned and was found an alternative seat in Wigtown Burghs.
[3] Murray was returned instead for Kirkcudbright Stewartry, but financial difficulties after the collapse of the Ayr Bank forced him to stand down in 1774.