On 31 Jan. 1688-9 he ordered the clergy to omit prayers for the Prince of Wales, and only to mention the king (without naming him) and all the royal family. On 29 Jan., when the House of Lords in grand committee debated whether, 'the throne being vacant, a regent or a king should fill it,' Compton and Trelawny of Bristol were the only bishops who voted with the majority for a king. Compton was reinstated as a privy councillor and dean of chapel royal on 14 Feb. ; on 31 March he consecrated Burnet bishop of Salisbury, and on 11 April crowned the king and queen at Westminster. In August, Sancroft, who declined to recognise William III, was suspended, and in the following February he was deprived. The primacy was thus vacant, and Compton, as one of the commissioners appointed to exercise its functions, had vast responsibility thrown upon him. On 20 Nov. he was chosen president of the upper house of convocation, and helped to revise the liturgy. He was afterwards appointed a commissioner of trade and plantations chiefly to superintend the colonial churches.
In the debate on the question of administering an oath abjuring James II, in 1690, Compton spoke at great length, and amused the house by stating that although there were obvious objections to multiplying oaths, 'he did not speak for himself : there was not nor could be made an oath to the present government that he would not take.' In 1691, when the Toleration and Comprehension Bills were before parliament, Compton enthusiastically supported them. 'These are two great works,' he wrote to Sancroft, who had shut himself up at Lambeth, 'in which the being of our church is concerned' (Tanner MS. xxvii. f. 41, printed in Notes and Queries, 2nd ser. i. 90-1). In January 1690-1 he attended William III, at his own expense, at the congress which met at the Hague to consolidate an alliance against France. The appointment of Tillotson to the primacy in August 1691 disappointed Compton, and in 1695 he was again overlooked, when Tenison succeeded Tillotson. This neglect soured him ; he gradually alienated himself from the whigs, and in the closing years of his life acted with the tories. On the death of Queen Mary in 1694 he presented the king with an address of condolence, and on 6 Dec. 1697 he preached the sermon at St. Paul's on thanksgiving day. In 1699 he was the only bishop who resisted the parliamentary motion to deprive Thomas Watson of the bishopric of St. David's for simony.
At the opening of Anne's reign the queen showed Compton much attention, and 'the bishop always supported those measures which were most agreeable to her majesty's own inclination and principles' (Birch, Life of Tillotson). She made him lord almoner in the place of the Bishop of Worcester, in November 1702, and in the following January ordered the Bishop of Salisbury's lodgings at St. James's to be handed over to him. He was in the commission for the union of Scotland in 1704, but was not reappointed when the commission was reorganised in April 1706. He was reappointed permanent commissioner of trades and plantations in January 1704-5, at a salary of 1,000l. a year. Compton supported the bill against occasional conformity, and spoke in favour of the motion that the church was in danger in 1705. In 1706 he apologised to the church of Geneva for some reflections cast upon it at Oxford, aided Sacheverell by speech and A r ote in 1710, and welcomed the change of ministry which took place in that year. He explained this decisive avowal of toryism in a letter to his clergy, but his abandonment of his former political attitude called forth a clever pamphlet, in which quotations from his early publications were relied upon to convict him of the grossest inconsistency ('A Letter concerning Allegiance, 1710,'reprinted in Somers Tracts, xii. 322 et seq.) In his later years Compton suffered from the gout and stone. Early in 1711 he was dangerously ill. He died at Fulham on 7 July 1713, aged 81, and was buried on 15 July outside Fulham Church, in accordance with his special direction. Dr. Thomas Gooch preached a funeral sermon at St. Paul's Cathedral on 26 July 1713. His charities and his hospitality were there especially commended. He spent all his fortune in helping Irish protestants, Scottish episcopalians, and refugees who fled to England from the persecution of foreign countries. He paid for the education of poor children, and among his proteges was George Psalmanazar [q. v.], the literary impostor, whom he sent to Oxford and treated with invariable kindness (Psalmanazar, Memoirs, 1764, pp. 179, 187, et seq.) Compton liberally contributed to funds for rebuilding churches and hospitals, and vigorously promoted Queen Anne's Bounty Fund. His benevolence greatly diminished his private fortune, and he died a poor man.
Compton translated the 'Life of Donna Olympia Maldachini' from the Italian, 1667, the 'Jesuits' Intrigues 'from the French, and 'Treatise of the Holy Communion,' 1677, from André Lortie's 'Traité de la Sainte Cène,' pt. i. (Notes and Queries, 5th ser. x. 85). Besides the letters issued to the clergy of London under the title of 'Episcopalia'