Pepys first job was as secretary to Edward Montagu, councillor of state for Oliver Cromwell's protectorate. In 1655 he married Elizabeth St Michel, the fourteen-year-old daughter of an impoverished Frenchman. A few years later Pepys began working part-time as a teller in the Exchequer while still working for Montagu who had become a general-at-sea.
Following the restoration of the monarchy, Montagu became the Earl of Sandwich and a Knight of the Garter. With this influence he secured a post for Pepys at the Navy Board as clerk of the acts. By this time Pepys eyesight was failing and as a result he had to stop writing the diary that was to secure his place in posterity. He wrote his last entry on 31st May 1669:
And thus ends all that I doubt I shall ever be able to do with my own eyes in the keeping of my journal, I being not able to do it any longer, having done now so long as to undo my eyes almost every time that I take a pen in my hand; and, therefore, whatever comes of it, I must forbear: and, therefore, resolve, from this time forward, to have it kept by my people in long-hand, and must therefore be contented to set down no more than is fit for them and all the world to know; or, if there be any thing, which cannot be much, now my amours to Deb. are past, and my eyes hindering me in almost all other pleasures, I must endeavour to keep a margin in my book open, to add, here and there, a note in short-hand with my own hand.
And so I betake myself to that course, which is almost as much as to see myself go into my grave: for which, and all the discomforts that will accompany my being blind, the good God prepare me!
In spite of his inability to see, Pepys' administrative ability secured him the promotion to Secretary to the Admiralty Commission in 1673. By then he had also become a member of the Royal Society, received the freedom of the city of Portsmouth, and that same year he became Member of Parliament for Castle Rising in Norfolk. Three years later he was elected as a Master of Trinity House (the body that administered England's lighthouses) and in 1679 he became M.P. for Harwich in Essex.
A loyal supporter of King James II, he resigned his posts at the Admiralty following the Glorious Revolution of 1688. Over the next two years he was twice jailed in the Tower of London on suspicion of conducting treasonable correspondance with the exiled court in France. Following his release he retired from public life, and lived the last few years of his life outside the city in Clapham before his death on 26th May 1703.
Project Gutenberg includes the complete text of the Diary of Samuel Pepys.