While humans have been sharing ghost stories for thousands of years —Pliny the Younger offered an especially spooky Roman take at around 100 AD — the thing that ghosts say when you meet them is pretty modern. As noted on Etymonline and highlighted by Gretchen McCulloch, “boo” got its start in the early 15th century as boh, or a “combination of consonant and vowel especially fitted to produce a loud and startling sound.”
As a short but mighty syllable, boo is well-suited to its task: the “b” comes out quickly, and the “oo” is sharp and strong — perfect for a supernatural interjection. In doing some word hunting at Slate, Forrest Wickman reports that one of the earliest written record of boo comes from 1738, in Scotch Presbyterian Eloquence Display’d, where the author Gilbert Crokatt has it that boo is a “a word that’s used in the north of Scotland to frighten crying children,” which is terrible and weird.
The word seems to have arrived at its startling power by the 1820s, Wickman recounts, when “boo” became the word used to startle people during the witchiest parts of the year, preferably while wearing a sheet over one’s head. It also worked on animals: By 1870, “crying boo to a goose” was the thing kids were told to do when dealing with aggressive waterfowl: If a goose steps to you, one author advised, cry “boo!” loudly and the bird will “will retire defeated.”
The Oxford English Dictionary compares “boo” to the Latin boare and the Greek boaein, “to cry aloud, roar, shout.” So when a ghost says “boo,” then, in a certain historical sense, it’s saying “I’m yelling,” which is super adorable. Even better, notes Wickman, the English “boo” has siblings across Europe. In Spain you frighten someone with “uuh,” in France with “hou,” in the Czech Republic, “baf.”