1830, American English, from Pennsylvania German hexe "to practice witchcraft," from German hexen "to hex," related to Hexe "witch," from Middle High German hecse, hexse, from Old High German hagazussa (see hag). Noun meaning "magic spell" is first recorded 1909; earlier it meant "a witch" (1856). Compare Middle English hexte "the devil" (mid-13c.), perhaps originally "sorcerer," probably from Old English haehtis.
Entries linking to hex
The first element probably is cognate with Old English haga "enclosure, portion of woodland marked off for cutting" (see hedge (n.)). Old Norse had tunriða and Old High German zunritha, both literally "hedge-rider," used of witches and ghosts. The second element in the prehistoric compound may be connected with Norwegian tysja "fairy; crippled woman," Gaulish dusius "demon," Lithuanian dvasia "spirit," from PIE *dhewes- "to fly about, smoke, be scattered, vanish."
One of the magic words for which there is no male form, suggesting its original meaning was close to "diviner, soothsayer," which were always female in northern European paganism, and hægtesse seem at one time to have meant "woman of prophetic and oracular powers" (Ælfric uses it to render the Greek "pythoness," the voice of the Delphic oracle), a figure greatly feared and respected. Later, the word was used of village wise women.
Haga is also the haw- in hawthorn, which is an important tree in northern European pagan religion. There may be several layers of folk etymology here. Confusion or blending with heathenish is suggested by Middle English hæhtis, hægtis "hag, witch, fury, etc.," and haetnesse "goddess," used of Minerva and Diana.
If the hægtesse once was a powerful supernatural woman (in Norse it is an alternative word for Norn, any of the three weird sisters, the equivalent of the Fates), it might originally have carried the hawthorn sense. Later, when the pagan magic was reduced to local scatterings, it might have had the sense of "hedge-rider," or "she who straddles the hedge," because the hedge was the boundary between the civilized world of the village and the wild world beyond. The hægtesse would have a foot in each reality. Even later, when it meant the local healer and root collector, living in the open and moving from village to village, it may have had the mildly pejorative Middle English sense of hedge- (hedge-priest, etc.), suggesting an itinerant sleeping under bushes. The same word could have contained all three senses before being reduced to its modern one.