Haartman was born on 8 March 1717 in Stockholm, Sweden, the son of Finnish parents Johan Jakobsson Haartman, a priest, and Maria Kristoffersdotter Sundenius.
He graduated from the Royal Academy of Turku in 1730 and from Uppsala University in 1733.
He earned his master's degree from the Royal Academy of Turku in 1741.
In 1742 he became an associate professor of Philosophy and a deputy librarian in 1750, a deputy secretary in 1755 and a professor of Philosophy and History in 1756.
Haartman was married to Eleonora Elisabet de la Myle (1726-1810).