Despite the fact that the first two syllables of bogeyman are pronounced just like boogie, the antics of bogeymen, vaguely defined imaginary beings conjured to threaten misbehaving children—as far as can be ascertained—do not include dancing, and the words are apparently unrelated.
Bogey appears to have derived ultimately from the Middle English noun bugge, meaning “something frightening” (which may also be the origin of bug) and was first attached to -man hundreds of years ago. Because of its pronunciation, bogeyman is commonly misspelled boogeyman and in the United States has even been pronounced and spelled boogerman, though the word for dried nasal mucus presumably has no connection.
The term bogey for a golf score that is one more shot than par is not related; it was based on the personification of a golfing opponent supposedly inspired by a real-life Colonel Bogey (who also inspired “The Colonel Bogey March,” a military tune). Bogey has also been a nickname for various people, most prominently twentieth-century actor Humphrey Bogart. (In his case, however, it was usually spelled Bogie.) However, the military-aviation code word for an unidentified aircraft, established during World War II, is based on bogeyman.
Related terms include bugbear and bugaboo, which originally referred to similar putative entities but now apply primarily to a source of annoyance or dread.
Boogie, by contrast, refers to an element of music originally heard in blues as a signature of boogie-woogie music but later incorporated into rockabilly and rock and roll. This term may derive from a word originating in a language spoken in what is now the African nation of Sierra Leone; bogi means “dance,” and the primary goal of boogie is to get people to boogie.