Maskelyne entered Cambridge University in 1749, studying mathematics, and graduating as a wrangler in mathematics in 1754. Ordained as a minister in 1755, he became a fellow of Trinity College, Cambridge in 1756.
Bad weather prevented any useful observations, however Maskelyne used his journey to develop a method of determining longitude using the position of the moon, the lunar distance method. He returned to England, resuming his position as curate at Chipping Barnet in 1761, and began work on a book, publishing the lunar distance method of longitude calculation in 1763 in The British Mariner's Guide, which included the suggestion that to facilitate the finding of longitude at sea, lunar distances should be calculated beforehand for each year and published in a form accessible to navigators. This proposal, the germ of the Nautical Almanac, was approved by the government, and under the care of Maskelyne the Nautical Almanac for 1767 was published in 1766. He further induced the government to print his observations annually.
Despite a possible conflict of interests, Maskelyne being an advocate of the lunar distance method of determining longitude, the Board of Longitude sent him to Barbados in 1763 to calculate the longitude of the capital, Bridgetown by observation of Jupiter's satellites, and also to test his lunar distance method and compare its accuracy to John Harrison's chronometer, the No. 4 timekeeper. Even after a successful trial in Barbados in 1764 observed by Maskelyne, Harrison was required to produce detailed drawings and build two more chronometers, one of which was eventually tested by King George III himself.
The results of the voyage were made public at a meeting of the Board of Longitude in early 1765, where it was disclosed that Harrison's chronometer had produced Bridgetown's longitude with an error of less than ten miles after a sea voyage of more than 5,000 miles. Maskelyne's method on the other hand showed an error of 30 miles. However, four of the naval officers present stated that their calculations had been performed to Maskelyne's instructions and were therefore subject to their inexperience. Also, since the lunar distance method relied on tables that only Maskelyne was capable of calculating, the method was not yet in a position to take the prize.
However, two Astronomers Royal had recently died in quick succession and Maskelyne was appointed to the position soon after his return to England. The position automatically made him an ex-officio member of the Board of Longitude and it was not long before a negative report was made on Harrison's chronometer, Maskelyne refusing to allow for the known rate at which Harrison's chronometer gained or lost time and thus dismissing it as inaccurate. It should be noted that he was not alone in his position on lunar distances; other members of the Board of Longitude and the Royal Society were also strongly biased toward lunars, as they saw the scientific solution being conceptually and intellectually superior to the mechanic's solution. When eventually Harrison was paid the money owing to him, it was by a special Act of Parliament rather than the Board of Longitude.
Nonetheless, it is important not to let these events overshadow the important contributions that Maskelyne made to the sciences of navigation and astronomy. While chronometers were indeed more accurate, the lunar distance method was cheaper and was the predominant method used well into the 19th century. Since Maskelyne's observations and calculations were made at the Royal Greenwich Observatory, the Greenwich meridian eventually became a common base for longitude worldwide and was adopted internationally as the Prime Meridian in 1884.
Maskelyne performed his experiment in 1774 on Schiehallion in Perthshire, Scotland, the mountain being chosen due to its regular conical shape which permitted a reasonably accurate determination of its volume. The apparent difference of latitude between two stations on opposite sides of the mountain were compared with the real difference of latitude obtained by triangulation.
From Maskelyne’s observations Charles Hutton deduced a density for the earth 4.5 times that of water (the modern value is 5.515).
Maskelyne was awarded the Royal Society's Copley medal in 1775 for this work.
Maskelyne also introduced several practical improvements, such as the measurement of time to tenths of a second; and prevailed upon the government to replace Bird’s mural quadrant by a repeating circle 6 feet (1.8 m) in diameter. The new instrument was constructed by Edward Troughton but Maskelyne did not live to see it completed.
His sister, Margaret, married Robert Clive.
Nevil Maskelyne is buried in the churchyard of St Mary the Virgin, the parish church of the village of Purton, Wiltshire, England. His grave can be see by going through the church gates and veering to the right, against the right outside wall of the church.