He enrolled as a student in 1797, and finished the studies to be appointed town clerk (byskriver) in the Danish town of Calundborg in 1801.
In 1809 he was appointed district stipendiary magistrate (sorenskriver) in Flekkefjord, in 1820 in Nordre Hedemarken. From 1830 to his death in 1840 he was burgomaster of Trondhjem. Their son Henrik Steffens Hagerup became a notable military officer and politician.
Hagerup was a member of the Royal Norwegian Society of Sciences and Letters from 1831.