David Hartley was born in Bury St Edmunds, Suffolk, England in 1731, the only son of philosopher David Hartley (1705-1757) and Alice Rowley (1705-1731), who died in childbirth. A 1750 graduate from Corpus Christi College, Oxford, he studied medicine in Leyden, Netherlands, in 1757, and entered Lincoln's Inn for the study of law in 1759. Around this time, he met and became the intimate friend of Benjamin Franklin in London. In the 1760s, he began writing influential pamphlets. In his essays, which were primarily political in nature, Harley criticized the Grenville and Bute administrations, addressed law and finance topics, and reflected on scientific matters. He also became interested in fireproofing and built a famous fireproof house with iron and copper plates between the floors, which he tested publicly in 1776.
From 1774 to 1780 and from 1782-1784, Hartley represented Kingston upon Hull in Parliament. During this time, he expressed strong opposition to the war with America; his most famous pamphlet, "Letters on the American War," accused Great Britain of tyranny over the colonies and proposed reconciliation between the two sides. Hartley was also a vigorous opponent of the African slave trade. Although a liberal on American policy, he was a long-time friend of Lord North and strongly disliked Shelburne; he supported the Coalition by voting against Shelburne's peace preliminaries. Hartley was sent to Paris in April 1783, in order to assist in the negotiations that ended the war with the United States, to make a trade agreement. After 1784, Hartley retired from politics and dedicated himself increasingly to the study of mechanics and chemistry. He never married. He died in Bath, Somerset, England, on December 19, 1813.