After the "Glorious Revolution" of 1688 Melville played a prominent part in Scots and English politics, most notably in the Convention Parliament which offered the crown of Scotland to William of Orange and his wife, Mary, daughter of the deposed James VII.
Although Melville's appointment as Keeper of the Privy Seal of Scotland in 1693 was a political demotion he enjoyed substantial emoluments, the more so after 1696 when he became President of the Privy Council of Scotland at an annual salary of £1,000 sterling.