He was born at Mellsetter, Hoy in Orkney, the son of Robert Heddle (1780-1842) and his wife, Henrietta Moodie.
After receiving his early education at Edinburgh Academy 1837 to 1843 he moved to Merchiston Castle School. In 1845 he entered as a medical student at the University of Edinburgh, and subsequently studied chemistry and mineralogy at Klausthal and Freiburg. In 1851 he took his degree of MD at Edinburgh, and for about five years practised there.
In the 1850s, together with Patrick Dudgeon, he undertook a survey of the Faroe Islands also collecting many minerals. This was followed by similar survey expeditions to the Shetland Islands and Orkney. They co-founded the Mineralogical Society of Great Britain in 1876.
Medical work, however, possessed for him little attraction. He became an assistant to Prof. Connell, who held the chair of chemistry at St Andrews, and in 1862 succeeded him as professor. This post he held until in 1880 he was invited to report on some gold mines in South Africa. On his return he devoted himself with great assiduity to mineralogy, and formed one of the finest collections by means of personal exploration in almost every part of Scotland. His specimens are now in the Royal Scottish Museum at Edinburgh. In 1874 he joined Ben Peach on various scientific explorations and from 1878 was also joined by John Horne.
In 1876 he was elected a Fellow of the Royal Society of Edinburgh. His proposers were John Hutton Balfour, Peter Guthrie Tait, Alexander Crum Brown, and Sir Archibald Geikie. He won the Society's Keith Prize for the period 1875-1877.
It had been his intention to publish a comprehensive work on the mineralogy of Scotland. This he did not live to complete, but the manuscripts fell into able hands, and The Mineralogy of Scotland, in 2 vols, edited by JG Goodchild, was issued in 1901.
Heddle was one of the founders of the Mineralogical Society, and he contributed many articles on Scottish minerals, and on the geology of the northern parts of Scotland, to the Mineralogical Magazine, as well as to the Transactions of the Royal Society of Edinburgh.
He was a keen amateur mountaineer and one of the first honorary members of the Scottish Mountaineering Club. He is known to have climbed with his friend, the artist Colin Philp, and the chemist, William Inglis Clark.
He died in St Andrews on 19 November 1897. He is buried in the ground of A. MacCechnie, surgeon, his father-in law, with his wife in the churchyard of St Andrews Cathedral. The grave lies on the south wall of the original churchyard, midway between the door to the south cemetery and the Whyte-Melville monument in the south-east corner.The Mineralogy of Scotland (1923) co-written with Donald Esme Innes
He was a cousin of Charles Heddle.
He married Mary Jane Sinclair MacKechnie (1831-1891) in 1858. They had ten children.
Their daughter Clementina Christian Sinclair Heddle (1860-1942) married the mineralogist Alexander Thoms FRSE.
A plaque in St Andrews marks the house where they lived from 1871, now in the grounds of St Leonards School.