1593, "a 'vocal gesture' expressing the action of puffing anything away" [OED], first attested in Hamlet Act I, Scene III, where Polonius addresses Ophelia with, "Affection! pooh! you speak like a green girl, / Unsifted in such perilous circumstance. / Do you believe his tenders, as you call them?"
But the "vocal gesture" is perhaps ancient. Among the many 19th century theories of the origin of language was the Pooh-pooh theory
(1860), which held that language grew from natural expressions of surprise, joy, pain, or grief. The slang reduplicated verb pooh-pooh
"to dismiss lightly and contemptuously" is attested from 1827. Pooh
as baby-talk for "excrement" is from 1950s (cf. poop