admonition to a pest, by 1867 (in baseball slang), from shoo
(v.) + fly
(n.). Popularized by a Dan Bryant minstrel song c. 1870, which launched it as a catch-phrase that, according to H.L. Mencken, "afflicted the American people for at least two years." Shoo-fly pie
is attested from 1935.