Wow, I thought for sure that would turn out to be an urban legend, but it's real and was medical:
> ...it was a general mainstream medical procedure used to, among many other things, resuscitate people who were otherwise presumed dead. In fact, it was such a commonly used resuscitation method for drowning victims particularly... Smoke was blown up the rectum by inserting a tube. This tube was connected to a fumigator and a bellows which when compressed forced smoke into the rectum. Sometimes a more direct route to the lungs was taken by forcing the smoke into the nose and mouth, but most physicians felt the rectal method was more effective. The nicotine in the tobacco was thought to stimulate the heart to beat stronger and faster, thus encouraging respiration... Artificial respiration was used if the tobacco enema did not successfully revive them. [1]
So it's not like it was for fun. But I can see how for fast delivery of nicotine, it made perfect sense.
Never heard of blowing smoke up someone's ass? It was literal in the 18th century.