"insect," 1620s (earliest reference is to bedbugs), probably from M.E. bugge "something frightening, scarecrow" (late 14c.), a meaning obsolete except in bugbear (1570s) and bugaboo (q.v.); probably connected with Scot. bogill "goblin, bugbear," or obsolete Welsh bwg "ghost, goblin" (cf. Welsh bwgwl "threat," earlier "fear"). Cf. also bogey (1) and Ger. bögge, böggel-mann "goblin." Perhaps influenced in meaning by O.E. -budda used in compounds for "beetle" (cf. Low Ger. budde "louse, grub," M.L.G. buddech "thick, swollen"). Meaning "defect in a machine" (1889) may have been coined c.1878 by Thomas Edison (perhaps with the notion of an insect getting into the works). Meaning "person obsessed by an idea" (e.g. firebug) is from 1841. Sense of "microbe, germ" is from 1919. Bugs "crazy" is from c.1900.
"to bulge," 1870s, perhaps from a humorous or dialect mispronunciation of bulge. The verb "to annoy, irritate" is first attested 1949, probably in allusion to insect pests, from bug (n.). Sense of "equip with a concealed microphone" is from 1919. Related: Bugged; bugging. Phrase bug off is 1950s, perhaps from bugger off, which is chiefly British (by 1920s) but was picked up in U.S. Air Force slang in the Korean War.