1520s, "to clog, entangle, encumber" (a sense now obsolete), probably a shortening of empester, impester, from Middle French empestrer "place in an embarrassing situation" (Modern French empêtrer, Walloon epasturer), from Vulgar Latin *impastoriare "to hobble" (an animal), from Latin im- "in" + Medieval Latin pastoria (chorda) "(rope) to hobble an animal," from Latin pastoria, fem. of pastorius "of a herdsman," from pastor "herdsman" (see pastor (n.)).
Or directly from the French word. The sense of "annoy, disturb, trouble" (1560s) is from influence of pest. Related: Pestered; pestering.