Hartshorn was appointed as a lecturer in the Department of Chemistry at the University of Canterbury in Christchurch in 1960, and rose to become a professor in 1972. When he retired in 1996 he was made a professor emeritus.
Hartshorn's research centred on reaction mechanisms. He investigated the chemical rearrangement of steroids, cyclic sulfites, monoterpenes and acetylenic alcohols. His research included the ipso nitration of aromatic hydrocarbons and phenols, and their reactions with fuming nitric acid and nitrogen dioxide, as well as the chlorination of polysubstituted phenols. He also studied the reactions of cation radicals arising from the photolysis of aromatic hydrocarbons.
Hartshorn was elected a fellow of the New Zealand Institute of Chemistry in 1969, and a fellow of the Royal Society of New Zealand the following year. In 1973, he received the Hector Memorial Medal, at that time the highest honour for scientific excellence awarded by the Royal Society of New Zealand.