The son of an Anglican clergyman, David Hartley was born in 1705 in the vicinity of Halifax, Yorkshire. His mother died three months after his birth, and his father when David was fifteen. After receiving his B.A. and M.A. from Jesus College, Cambridge, Hartley practiced medicine in Bury St. Edmunds (1730–35), London (1735–42), and Bath, where he died on 28 August 1757.
He married twice: in 1730, firstly to Alice Rowley, who died in 1731 giving birth to their son David (1731–1813); and in 1735, Elizabeth Packer (1713–78), despite the opposition of her very wealthy family. The couple had two children, Mary (1736–1803) and Wincombe Henry (1740–94). Although severely afflicted with bladder stones, Hartley lived a full and active life: he practiced medicine, engaged in mathematical research, sought a cure for “the stone,” devoted himself to intellectual and philanthropic projects, and wrote the Observations on Man.