Why turkey has the same name as Turkey
1801, from Dutch spook, from Middle Dutch spooc "spook, ghost," from a common Germanic source (cf. German Spuk "ghost, apparition," Middle Low German spok "spook," Swedish spok "scarecrow," Norwegian spjok "ghost, specter," Danish spøg "joke"), of unknown origin. Possible outside connections include Lettish spigana "dragon, witch," spiganis "will o' the wisp," Lithuanian spingu, spingeti "to shine," Old Prussian spanksti "spark."
Meaning "undercover agent" is attested from 1942. The derogatory racial sense of "black person" is attested from 1940s, perhaps from notion of dark skin being difficult to see at night. Black pilots trained at Tuskegee Institute during World War II called themselves the Spookwaffe.
1867, "to walk or act like a ghost," from spook (n.). Meaning "to unnerve" is from 1935. Related: Spooked; spooking.
To put on edge; make apprehensive; frighten: ''It's the first time in my life I've ever been spooked,'' says a Byrd staffer (1935+)