Halley was born at Haggerston, London, the son of a wealthy soapboiler. He studied at St Pauls school, and then from 1673 at The Queens College at Oxford. Whilst an undergraduate he published papers on the Solar System and sunspots.
On leaving Oxford, in 1676, he visited the south Atlantic island of St Helena with the intention of studying stars from the southern hemisphere. He returned to England in November 1678. In the following year he published Catalogus Stellarum Australium which included details of 341 southern stars. These additions to the star map earned him comparison with Tycho Brahe.
Halley married in 1682 and settled in Islington. He spent most of his time on lunar observations, but was also interested in the problems of gravity. One problem that attracted his attention was the proof of Kepler's laws of planetary motion. In August 1684 he went to Cambridge to discuss this with Isaac Newton, only to find that Newton had solved the problem but published nothing. Halley convinced him to write the Principia Mathematica Philosophiae Naturalis (1687), which was published at Halley's expense.
In 1698 he received a commission as captain of HMS Paramour to make extensive observations on the conditions of terrestrial magnetism. This task he accomplished in an Atlantic voyage which lasted two years, and extended from 52 degrees north to 52 degrees south. The results were published in a General Chart of the Variation of the Compass (1701). This was the first such chart to be published and the first on which isogonic lines, or, as they were called, Halleyan lines, appeared.
In 1703 he was appointed professor of geometry at Oxford. In 1705 he published Synopsis Astronomia Cometicae, which stated his belief that the comet sightings of 1456, 1531, 1607 and 1682 related to the same comet, which he predicted would return in 1758. When it did it became generally known as Halley's Comet.
In 1716 Halley suggested a high-precision measurement of the distance between the earth and the sun by timing the transit of Venus. In 1718 he discovered the proper motions of the fixed stars by comparing his astrometric measurements with those of the Greeks.