In the latter years of Charles’s reign the strength of the navy was badly diminished with many ships laid up and rotting. Pepys continued as Secretary of the Admiralty as he and James worked hard to rebuild the navy to its former defensive strength. In the end it came to nothing as the fleet found itself pinned down at anchor by an easterly wind that carried the massive invasion force of Prince William of Orange across the North Sea in November 1688. The day after arriving in London William called for Pepys and requested that he remain at his post. When the first Parliamentary election of the new King’s reign took place in February 1689, however, Pepys, considered by the electorate to be one of the detested James’s men, lost his seat. He was a man whose time had passed and he resigned his position at the Admiralty.
He was succeeded at the Admiralty by men who had helped William come to power and who Pepys considered his enemies. He also refused to swear an oath of loyalty to William and Mary, which put him in a difficult position. Understanding the danger, he took with him a large number of records from the Admiralty and composed his memoirs of his time in the post. Arrested for ‘treasonable practices’ he was able to use the records to argue against the charges.
Enjoying the company of men of intellect, Pepys continued to hold gatherings every Saturday morning until the end of the century at his apartment in London. His former employee at the Navy Board, Will Hewer, had made a lucrative career for himself and purchased a large country house at Clapham. A loyal friend of his former master, in 1701 Hewer invited the elderly Pepys to live there permanently. Yet the country life was to only last a couple of years and in May 1703 he died. Pepys’s funeral at St. Olave’s was attended by many notable friends and acquaintances. He was buried alongside his wife Elizabeth and their monument stands there today.
By the time of his death Pepys had collected a library of 3,000 magnificent books and manuscripts. In his will he gave very specific instructions to his executors as to what should happen to the library, which included the original copy of the diary and the book cabinets, stating that the collection should not be added to after his death. Following his wishes they arranged for it to be given to Magdalene College, Cambridge. In 1724 the college set up the library, more or less how it could be found in Pepys’s own home, in the New Building to which he himself had been one of the benefactors and there it remains to this day.
Sources include: Stephen Coote ‘Samuel Pepys – A Life’; ‘A Diary of Samuel Pepys’ (Penguin edition); Adrian Tinniswood ‘By Permission of Heaven’; Gillian Tindall ‘The Man Who Drew London’.