Middle English wirien (c. 1300), "to slay, kill or injure by biting and shaking the throat" (as a dog or wolf does), from Old English wyrgan "to strangle," from Proto-Germanic *wurgjan (source also of Middle Dutch worghen, Dutch worgen, Old High German wurgen, German würgen "to strangle," Old Norse virgill "rope"), from *wergh-, from PIE root *wer- (2) "to turn, bend."
The "strangle" sense was obsolete in English after c. 1600; the figurative meaning "to annoy, bother, vex" is by c. 1400. Meaning "to cause mental distress or trouble" is attested from 1822; intransitive sense of "to feel anxiety or mental trouble" is attested by 1860. Related: Worried; worrier; worrying.