The story
Coined by author J. K. Rowling apparently at random; "invent[ed] […] after much transposition of syllables". Fans have pointed to the possible influence of Middle English hore (“iniquity, evil, sin”) and English crux (“the central or essential part”), or Turkish hortlak (“ghost”) among other theories. The term first appears in Harry Potter and the Half-Blood Prince (2005).
Etymology from Wiktionary, CC BY-SA 4.0.