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:

Mr. Jackson to Mr. Evelyn.
“Clapham, May 28th, 1703.
“Friday night.
“Honoured Sir,
“‘Tis no small addition to my grief, to be obliged to interrupt the
quiet of your happy recess with the afflicting tidings of my Uncle
Pepys’s death: knowing how sensibly you will partake with me herein.
But I should not be faithful to his desires, if I did not beg your
doing the honour to his memory of accepting mourning from him, as a
small instance of his most affectionate respect and honour for you.
I have thought myself extremely unfortunate to be out of the way at
that only time when you were pleased lately to touch here, and
express so great a desire of taking your leave of my Uncle; which
could not but have been admitted by him as a most welcome exception
to his general orders against being interrupted; and I could most
heartily wish that the circumstances of your health and distance did
not forbid me to ask the favour of your assisting in the holding up
of the pawll at his interment, which is intended to be on Thursday
next; for if the manes are affected with what passes below, I am
sure this would have been very grateful to his.
“I must not omit acquainting you, sir, that upon opening his body,
(which the uncommonness of his case required of us, for our own
satisfaction as well as public good) there was found in his left
kidney a nest of no less than seven stones, of the most irregular,
figures your imagination can frame, and weighing together four
ounces and a half, but all fast linked together, and adhering to his
back; whereby they solve his having felt no greater pains upon
motion, nor other of the ordinary symptoms of the stone. Some other
lesser defects there also were in his body, proceeding from the same
cause. But his stamina, in general, were marvellously strong, and
not only supported him, under the most exquisite pains, weeks beyond
all expectations; but, in the conclusion, contended for nearly forty
hours (unassisted by any nourishment) with the very agonies of
death, some few minutes excepted, before his expiring, which were
very calm.
“There remains only for me, under this affliction, to beg the
consolation and honour of succeeding to your patronage, for my
Uncle’s sake; and leave to number myself, with the same sincerity he
ever did, among your greatest honourers, which I shall esteem as one
of the most valuable parts of my inheritances from him; being also,
with the faithfullest wishes of health and a happy long life to you,
“Honoured Sir,
“Your most obedient and
“Most humble Servant,
“J. JACKSON.
“Mr. Hewer, as my Uncle’s Executor, and equally your faithful
Servant, joins with me in every part hereof.
“The time of my Uncle’s departure was about three-quarters past
three on Wednesday morning last.”