In 1668, he published Cowley's Latin poems, and prefixed, in Latin, the life of the author; which he afterwards amplified, and placed before Cowley's English works, which were by will committed to his care.
Ecclesiastical benefices now fell fast upon him. In 1668, he became a prebendary of Westminster, and had afterwards the church of St. Margaret, adjoining to the abbey. He was, in 1680, made canon of Windsor; in 1683, dean of Westminster; and, in 1684, bishop of Rochester.
The court having thus a claim to his diligence and gratitude, he was required to write the History of the Rye-house Plot; and, in 1685, published a true Account and Declaration of the horrid Conspiracy against the late King, his present Majesty, and the present Government; a performance which he thought convenient, after the revolution, to extenuate and excuse.
The same year, being clerk of the closet to the king, he was made dean of the chapel royal; and, the year afterwards, received the last proof of his master's confidence, by being appointed one of the commissioners for ecclesiastical affairs. On the critical day, when the declaration distinguished the true sons of the church of England, he stood neuter, and permitted it to be read at Westminster; but pressed none to violate his conscience; and, when the bishop of London was brought before them, gave his voice in his favour.
Thus far he suffered interest or obedience to carry him; but further he refused to go. When he found that the powers of the ecclesiastical commission were to be exercised against those who had refused the declaration, he wrote to the lords, and other commissioners, a formal profession of his unwillingness to exercise that authority any longer, and withdrew himself from them. After they had read his letter, they adjourned for six months, and scarcely ever met afterwards.
When king James was frighted away, and a new government was to be settled, Sprat was one of those who considered, in a conference, the great question, Whether the crown was vacant, and manfully spoke in favour of his old master.
He complied, however, with the new establishment, and was left unmolested; but, in 1692, a strange attack was made upon him by one Robert Young and Stephen Blackhead, both men convicted of infamous crimes, and both, when the scheme was laid, prisoners in Newgate. These men drew up an association, in which they whose names were subscribed, declared their resolution to restore king James, to seize the princess of Orange, dead or alive, and to be ready with thirty thousand men to meet king James when he should land. To this they put the names of Sancroft, Sprat, Marlborough, Salisbury, and others. The copy of Dr. Sprat's name was obtained by a fictitious request, to which an answer in his own hand was desired. His hand was copied so well, that he confessed it might have deceived himself. Blackhead, who had carried the letter, being sent again with a plausible message, was very curious to see the house, and particularly importunate to be let into the study; where, as is supposed, he designed to leave the association. This, however, was denied him; and he dropped it in a flower-pot in the parlour. Young now laid an information before the privy council; and May 7, 1692, the bishop was arrested, and kept at a messenger's, under a strict guard, eleven days. His house was searched, and directions were given that the flower-pots should be inspected. The messengers, however, missed the room in which the paper was left. Blackhead went, therefore, a third time; and finding his paper where he had left it, brought it away.
The bishop having been enlarged, was, on June the 10th and 13th, examined again before the privy council, and confronted with his accusers. Young persisted, with the most obdurate impudence, against the strongest evidence; but the resolution of Blackhead, by degrees, gave way. There remained at last no doubt of the bishop's innocence, who, with great prudence and diligence, traced the progress, and detected the characters of the two informers, and published an account of his own examination and deliverance; which made such an impression upon him, that he commemorated it through life by a yearly day of thanksgiving.
With what hope or what interest, the villains had contrived an accusation which they must know themselves utterly unable to prove, was never discovered.
After this he passed his days in the quiet exercise of his function. When the cause of Sacheverell put the publick in commotion, he honestly appeared among the friends of the church. He lived to his seventy-ninth year, and died May 20, 1713.