Hallager had a Danish background but he grew up in Bergen. He studied in Copenhagen and received his medical degree in 1804. As a student, he compiled a glossary of approximately 6,000 Norwegian words and expressions, titled Norsk Ordsamling (Norwegian Vocabulary). Today this is considered the first Norwegian dialect dictionary. Hallager later worked as a doctor in Bergen.