c. 1400, "spiced sauce served with meat or fowl" (early 14c. as a surname), probably from Middle Dutch pekel "pickle, brine," or related words in Low German and East Frisian (Dutch pekel, East Frisian päkel, German pökel), which are of uncertain origin or original meaning. Klein suggests the name of a medieval Dutch fisherman who developed the process.
The meaning "cucumber preserved in pickle" first recorded 1707, via use of the word for the salty liquid in which meat, etc. was preserved (c. 1500). Colloquial figurative sense of "a sorry plight, a state or condition of difficulty or disorder" is recorded by 1560s, from the time when the word still meant a sauce served on meat about to be eaten. Meaning "troublesome boy" is from 1788, perhaps from the notion of being "imbued" with roguery.