He was born in Alstahaug[1] as the youngest son of Jørgen Sverdrup Hersleb and his wife Anna Svendsdatter Borchmann.
[2] His sister Else married local businessman Jonas Greger Walnum.
He had befriended N. F. S. Grundtvig there, and stayed in Denmark after graduation to work as a teacher at the Metropolitanskolen.
Following the foundation of the Royal Frederick University in Christiania was founded in 1811, Hersleb was hired as a lector in 1813.
[1] Hersleb, noted as strongly orthodox, was among the founders of the Norwegian Bible Society in 1816.