He represented Beaumaris for the 1689 Convention Parliament, and turned against James after he fled England during the Glorious Revolution. He was placed on the committee appointed to draft the Bill of Rights. William III appointed Sir George Treby to succeed him as Solicitor General in the same year. Williams was made a King's Counsel and appointed Custos Rotulorum of Merionethshire and Denbighshire as consolation. The parliament declared the judgement against him for the publication of Dangerfield's "Information" illegal. He was not elected to Parliament in 1690, and prepared to stand again for Chester with Roger Whitley in 1695. Whitley was instead returned with Sir Thomas Grosvenor, and Williams was again returned for Beaumaris. He refused to take the new oath declaring William the rightful and lawful king, leading to his dismissal as King's Counsel. He left parliament in 1698.