 He was a Commissioner for the union with England in 1702, and again in 1706 when he was one of the Commissioners who negotiated the Act of Union 1707.In 1707 Dalrymple was one of the Scottish representatives to the first Parliament of Great Britain and at the 1708 British general election, he was returned as Member of Parliament for Haddington.In 1709 he was promoted from solicitor-general to the post of Lord Advocate of Scotland .