World War II aviator slang for "unidentified aircraft, presumably hostile," probably ultimately from bogge, a variant of Middle English bugge "a frightening specter" (see bug (n.)).
Thus it shares ancestry with many dialect words for "ghost, specter," such as bog/bogge (attested 16c.-17c.), bogeyman (16c.), boggart "specter that haunts a gloomy spot" (c. 1570, in Westmoreland, Lancashire, Cheshire, and Yorkshire). The earliest modern form appears to be Scottish bogle "ghost," attested from c. 1500 and popularized c. 1800 in English literature by Scott, Burns, etc.