
Pepys, like his friend, John Evelyn, kept a diary and on his death was left to the library at Magdalene College. Pepys was imprisoned by the new government and was not released until 1700. However, he was forced to resign after James II was ousted from power and replaced by the joint monarchs, William III and Mary II. Pepys was released and in 1683 and the following year was reinstated as Secretary to the Admiralty. Several people were executed, including Oliver Plunkett, the Archbishop of Armagh, before it was revealed that Titus Oates had been lying. This included Pepys who was imprisoned in the Tower of London. The government believed the story and eighty people were arrested and accused of taking part in the plot. He went on to argue that after James came to the throne Protestants would be massacred in their thousands. Oates claimed that Charles was to be replaced by his Roman Catholic brother, James. In 1678 Titus Oates announced that he had discovered a Catholic plot to kill Charles II. This was followed by Pepys becoming Survey-General of the Victualling Service (1665) and Secretary of the Admiralty (1672).

With the help of Montagu, Pepys was appointed Clerk of the King's Ships. On the Restoration Montagu was given command of the royal fleet. Paul's School and Magdalene College, Cambridge, he found work as secretary to Sir Edward Montagu. Samuel Pepys, the son of a tailor, John Pepys, was born in London in 1633.
