to bullshit or lie, to tell a falsehood. originally comes from the era of snake-oil salesmen and traveling hucksters pandering cure-all ointments.
one said cure for many ailments (including constipation) was a "tobacco enema" in which the purveyor would literally blow smoke up the afflicted's rectum with a device created solely for this purpose. obviously people caught on soon enough, and figured out that tobacco enemas were embarrassing as well as useless.
as such, the phrase became the euphemism it is today for selling a line of nonsense to an otherwise naive or unsuspecting rube.
person 1: "did you know that recent studies show that rat feces are as effective as any available wrinkle cream on the market?"
person 2: "you're totally blowing smoke up my ass"