early 13c., "to practice habitually, busy oneself with, take part in," from Old French hanter "to frequent, visit regularly; have to do with, be familiar with; indulge in, cultivate" (12c.), of uncertain origin, perhaps from Old Norse heimta "bring home," from Proto-Germanic *haimatjanan "to go or bring home," from *haimaz- "home" (from PIE root *tkei- "to settle, dwell, be home").
Meaning "to frequent (a place)" is from c. 1300 in English. In Middle English to haunte scole was "attend school," and in Middle English as in Old French the verb had a secondary sense of "have sexual intercourse with." Use in reference to a spirit or ghost returning to the house where it had lived perhaps was in Proto-Germanic, but if so it was lost or buried; revived by Shakespeare's plays, it is first recorded 1590 in "A Midsummer Night's Dream." Old French had a noun derivative, hantise "obsession, obsessive fear" (14c.).
c. 1300, "place frequently visited," also in Middle English, "a habit, custom" (early 14c.), from Old French hant "frequentation; place frequently visited," from hanter (see haunt (v.)). The meaning "spirit that haunts a place, ghost" is first recorded 1843, originally in stereotypical African-American vernacular, from the later meaning of the verb.