As a result of John's Oxford connections, in November of 1665, he was appointed to a diplomatic mission aimed at winning the Elector of Brandenburg as an ally against Holland. The experiment was a revolution, but the mission failed, he didn't win the Elector of Brandenburg. Brandenburg had a policy of toleration for Lutherans, Catholics, and Calvinists, and there was peace. To his friend Robert Boyle the chemist, John wrote: "They quietly permit one another to choose their way to heaven; and I cannot observe any quarrels or animosities (strongly hostile) amongst them on account of religion. " .
In the summer of 1666, Anthony Ashley Cooper, the rich and influential man he was, visited Oxford where he met Locke who was at the time studying medicine. Cooper was suffering from a liver cyst that was threatening to become swollen with infection. As a result, Cooper asked Locke to be his personal physician. Resultantly, Locke moved into Cooper's mansion in London. This move was the move that would embark him on adventures which would lead him to become a libertarian. Cooper served in the King's army during the Civil War, then switched to the Puritan side, and got to command Puritan soldiers in Dorset. However, because of Puritan purges, he was dismissed. He was arrested for trying to bring back the Stuarts and overthrow the Puritan Commonwealth. King Charles the second elevated him to the peerage (peers as a class; those holding honorary titles), he joined the King's Privy Council, he became Lord Ashley, and then the Earl of the Shaftesbury. .
Cooper served briefly as Lord High Chancellor, the most powerful minister and became a member of the four-man cabinet. As Shaftesbury's Infection worsened, Locke supervised a successful surgery in 1668. The thankful Shaftesbury encouraged Locke to develop his potential as a philosopher. Locke was nominated to be in the Royal Society, thanks to Shaftesbury.