Locke's father, who was also named John Locke, was a country lawyer and clerk to the Justices of the Peace in Chew Magna, who had served as a captain of cavalry for the Parliamentarian forces during the early part of the English Civil War. His mother, Agnes Keene, was a tanner's daughter and reputed to be very beautiful. Both parents were Puritans. Locke was born on 29 August 1632, in a small thatched cottage by the church in Wrington, Somerset, about twelve miles from Bristol. He was baptized the same day. Soon after Locke's birth, the family moved to the market town of Pensford, about seven miles south of Bristol, where Locke grew up in a rural Tudor house in Belluton.
In 1647, Locke was sent to the prestigious Westminster School in London under the sponsorship of Alexander Popham, a member of Parliament and his father's former commander. After completing his studies there, he was admitted to Christ Church, Oxford. The dean of the college at the time was John Owen, vice-chancellor of the university. Although a capable student, Locke was irritated by the undergraduate curriculum of the time. He found the works of modern philosophers, such as René Descartes, more interesting than the classical material taught at the university. Through his friend Richard Lower, whom he knew from the Westminster School, Locke was introduced to medicine and the experimental philosophy being pursued at other universities and in the English Royal Society, of which he eventually became a member.
Locke was awarded a bachelor's degree in 1656 and a master's degree in 1658. He obtained a bachelor of medicine in 1674, having studied medicine extensively during his time at Oxford and worked with such noted scientists and thinkers as Robert Boyle, Thomas Willis, Robert Hooke and Richard Lower. In 1666, he met Lord Anthony Ashley Cooper, 1st Earl of Shaftesbury, who had come to Oxford seeking treatment for a liver infection. Cooper was impressed with Locke and persuaded him to become part of his retinue.
Locke had been looking for a career and in 1667 moved into Shaftesbury's home at Exeter House in London, to serve as Lord Ashley's personal physician. In London, Locke resumed his medical studies under the tutelage of Thomas Sydenham. Sydenham had a major effect on Locke's natural philosophical thinking – an effect that would become evident in the An Essay Concerning Human Understanding.
Locke's medical knowledge was put to the test when Shaftesbury's liver infection became life-threatening. Locke coordinated the advice of several physicians and was probably instrumental in persuading Shaftesbury to undergo an operation (then life-threatening itself) to remove the cyst. Shaftesbury survived and prospered, crediting Locke with saving his life.
It was in Shaftesbury's household, during 1671, that the meeting took place, described in the Epistle to the reader of the Essay, which was the genesis of what would later become the Essay. Two extant Drafts still survive from this period. It was also during this time that Locke served as Secretary of the Board of Trade and Plantations and Secretary to the Lords and Proprietors of the Carolinas, helping to shape his ideas on international trade and economics. John LockeShaftesbury, as a founder of the Whig movement, exerted great influence on Locke's political ideas. Locke became involved in politics when Shaftesbury became Lord Chancellor in 1672. Following Shaftesbury's fall from favour in 1675, Locke spent some time travelling across France as tutor and medical attendant to Caleb Banks. He returned to England in 1679 when Shaftesbury's political fortunes took a brief positive turn. Around this time, most likely at Shaftesbury's prompting, Locke composed the bulk of the Two Treatises of Government. While it was once thought that Locke wrote the Treatises to defend the Glorious Revolution of 1688, recent scholarship has shown that the work was composed well before this date, however, and it is now viewed as a more general argument against Absolute monarchy (particularly as espoused by Robert Filmer and Thomas Hobbes) and for individual consent as the basis of political legitimacy. Though Locke was associated with the influential Whigs, his ideas about natural rights and government are today considered quite revolutionary for that period in English history.
However, Locke fled to the Netherlands in 1683, under strong suspicion of involvement in the Rye House Plot, although there is little evidence to suggest that he was directly involved in the scheme. In the Netherlands, Locke had time to return to his writing, spending a great deal of time re-working the Essay and composing the Letter on Toleration. Locke did not return home until after the Glorious Revolution. Locke accompanied William of Orange's wife back to England in 1688. The bulk of Locke's publishing took place upon his return from exile – his aforementioned Essay Concerning Human Understanding, the Two Treatises of Civil Government and A Letter Concerning Toleration all appearing in quick succession.
Locke's close friend Lady Masham invited him to join her at the Mashams' country house in Essex. Although his time there was marked by variable health from asthma attacks, he nevertheless became an intellectual hero of the Whigs. During this period he discussed matters with such figures as John Dryden and Isaac Newton.
He died in 28 October 1704, and is buried in the churchyard of the village of High Laver, east of Harlow in Essex, where he had lived in the household of Sir Francis Masham since 1691. Locke never married nor had children.
Events that happened during Locke's lifetime include the English Restoration, the Great Plague of London and the Great Fire of London. He did not quite see the Act of Union of 1707, though the thrones of England and Scotland were held in personal union throughout his lifetime. Constitutional monarchy and parliamentary democracy were in their infancy during Locke's time.