1826, "supply with a wig," from wig (n.). The earlier verb was bewig (see bewigged). The meaning "to behave hysterically" (usually with out) is attested from 1955, perhaps from notion in flip one's wig. Compare dash my wig!, a former mild imprecation (1797), also wigs on the green (1856), Irish colloquial for "a fight or rumble" (because wigs are likely to get detached from owners in such an event). The verb also had a colloquial sense of "scold severely," attested by 1829, perhaps related to these. Related: Wigged; wigging.
1590s "to fillip, to toss with the thumb," imitative, or perhaps a thinned form of flap, or else a contraction of fillip (q.v.), which also is held to be imitative. Meaning "toss as though with the thumb" is from 1610s. Meaning "to flip a coin" (to decide something) is by 1879. Sense of "get excited" is first recorded 1950; flip (one's) lid "lose one's head, go wild" is from 1949, American English; variant flip (one's) wig attested by 1952, but the image turns up earlier in popular record reviews ["Talking Boogie. Not quite as wig-flipping as reverse side--but a wig-flipper" Billboard, Sept. 17, 1949]. Related: Flipped. Flipping (adj.) as euphemism for fucking is British slang first recorded 1911 in D.H. Lawrence. Flip side (of a gramophone record) is by 1949.