A corruption of the Saxon ear-wicga (ear-insect); so called because the hind wings resemble in shape the human ear. The word has engendered the notion that these insects are apt to get into our ears.
“Court earwigs banish from your ears.” Political Ballads.
Source: Dictionary of Phrase and Fable, E. Cobham Brewer, 1894
More on Earwig from Infoplease: