We have little or no information to guide us as to Pepys's proceedings at the period of the Revolution. We know that James II. just before his flight was sitting to Kneller for a portrait intended for the Secretary to the Admiralty, and that Pepys acted in that office for the last time on 20th February, 1688-89, but between those dates we know nothing of the anxieties and troubles that he must have suffered. On the 9th March an order was issued from the Commissioners of the Admiralty for him to deliver up his books, &c., to Phineas Bowies, who superseded him as secretary.

Pepys had many firm friends upon whom he could rely, but he had also enemies who lost no opportunity of worrying him. On June 10th, 1690, Evelyn has this entry in his Diary, which throws some light upon the events of the time:—

"Mr. Pepys read to me his Remonstrance, skewing with what malice and
injustice he was suspected with Sir Anth. Deane about the timber of
which the thirty ships were built by a late Act of Parliament, with
the exceeding danger which the fleete would shortly be in, by reason
of the tyranny and incompetency of those who now managed the
Admiralty and affairs of the Navy, of which he gave an accurate
state, and shew'd his greate ability."

On the 25th of this same month Pepys was committed to the Gatehouse at Westminster on a charge of having sent information to the French Court of the state of the English navy. There was no evidence of any kind against him, and at the end of July he was allowed to return to his own house on account of ill-health. Nothing further was done in respect to the charge, but he was not free till some time after, and he was long kept in anxiety, for even in 1692 he still apprehended some fresh persecution.

Sir Peter Palavicini, Mr. James Houblon, Mr. Blackburne, and Mr. Martin bailed him, and he sent them the following circular letter:—

"October 15, 1690.
"Being this day become once again a free man in every respect, I
mean but that of my obligation to you and the rest of my friends, to
whom I stand indebted for my being so, I think it but a reasonable
part of my duty to pay you and them my thanks for it in a body; but
know not how otherwise to compass it than by begging you, which I
hereby do, to take your share with them and me here, to-morrow, of a
piece of mutton, which is all I dare promise you, besides that of
being ever,
"Your most bounden and faithful humble servant,
"S. P."

He employed the enforced idleness caused by being thrust out of his employment in the collection of the materials for the valuable work which he published in 1690, under the title of "Memoirs of the Navy." Little more was left for him to do in life, but as the government became more firmly established, and the absolute absurdity of the idea of his disloyalty was proved, Pepys held up his head again as a man to be respected and consulted, and for the remainder of his life he was looked upon as the Nestor of the Navy.

There is little more to be told of Pepys's life. He continued to keep up an extended correspondence with his many friends, and as Treasurer of Christ's Hospital he took very great interest in the welfare of that institution. He succeeded in preserving from impending ruin the mathematical foundation which had been originally designed by him, and through his anxious solicitations endowed and cherished by Charles II. and James II. One of the last public acts of his life was the presentation of the portrait of the eminent Dr. John Wallis, Savilian Professor of Geometry, to the University of Oxford.

In 1701 he sent Sir Godfrey Kneller to Oxford to paint the portrait, and the University rewarded him with a Latin diploma containing in gorgeous language the expression of thanks for his munificence.'

On the 26th May, 1703, Samuel Pepys, after long continued suffering, breathed his last in the presence of the learned Dr. George Hickes, the nonjuring Dean of Worcester, and the following letter from John Jackson to his uncle's lifelong friend Evelyn contains particulars as to the cause of death: