He was born at Ecclefechan, Scotland, a son of James (1803–78) and Jane (née Wield)[1] Harkness.
Harkness served in the military, traveled extensively, and headed research missions developing techniques and equipment for astronomical study.
[5] In August 1862, he served as volunteer surgeon for the Union Army at the Second Battle of Bull Run.
In August 1863, Harkness was commissioned as a professor of mathematics in the United States Navy with the relative rank of lieutenant commander.
[4] After service on the monitor USS Monadnock from 1865 to 1866, he was employed in the United States Hydrographic Office.
Three years later he was made a member of the Transit of Venus Commission,[9] and had charge of the party at Hobart, Tasmania in 1879 and at Washington in 1882, when he became the executive officer.