A sub-trope of Anthropomorphic Personification, this is the representation of vices that are drunk, smoked, snorted, ingested, or injected as people or animated anthropomorphized objects.
The Trope Namer, John Barleycorn, is a character from British folklore who represents barley and the alcoholic beverages made from it (e.g., beer and whiskey). Temperance advocates would later use John Barleycorn to personify the social evils caused by alcoholic beverages.
This trope is frequently done for the purpose of warning about drinking, smoking, or using drugs and the depiction can often come across as Anvilicious. Other times, the John Barleycorn And Friends trope will be employed in a less serious and more light-hearted fashion.
Can also apply to situations where a liquor that's named after a person is used in a sentence as if it were a person. As in "My friends Jack [Daniels] and Jim [Beam]."
Absinthe has been long anthropomorphized as "the green fairy" as seen in Moulin Rouge!.
In Mac And Devin Go To High School there's an anthropomorphic, CG joint that narrates the film and then filibusters about why weed should be legalized. It was made to be one of those movies.
The 1964 Rat Pack musical Robin And The Seven Hoods features the "Mr. Booze" number which takes place at a phony temperance meeting where the participants testify to the evils caused by title character of the song. (This scene was later paid homage to in an episode of Family Guy.)
At the end of Half Baked, when Thurgood stands on the bridge with his last joint in his hand, intending to throw it in the water so he can be with his love Mary Jane, he imagines the joint as having the face of a black woman who begs him to smoke her/it.
Kumar is trying to liberate Harold from jail in Harold And Kumar Go To White Castle when he is distracted by a giant bag of weed at the police station. Kumar immediately forgets about Harold and has an elaborate Dream Sequence where he falls in love with the anthropomorphized bag of weed—then makes love to said anthropomorphized bag of weed—then marries the bag of weed—then is stuck in a miserable squabbling marriage with the bag of weed.
Harold: Kumar! Still in jail, asshole! Come here!
The commentary for The Jackhammer Massacre had the director mention he wanted to have the junkie Villain Protagonist hallucinate some kind of "Lord Meth" character. The idea was ultimately reduced to just having him hallucinate that a man has giant syringes for arms.
Jack London titled his autobiography, which described his struggles with alcohol, John Barleycorn.
John Barleycorn is briefly mentioned in Hogfather when Susan finds the area of the lifetimer room reserved for anthropomorphic personifications. The Oh God of Hangovers might count as well.
In Simon R. Green's Hawk & Fisher novel The God Killer, the medieval-fantasy beat cops stop off at the Temple of John Barleycorn for a refreshing libation after a hard day of investigation a crime spree in the religious district.
In Father Ted, when the priests give up their various vices for Lent, they start hallucinating, seeing each other as personifications of those vices - Ted appears to Jack as a pint of Guinness and to Dougal as a giant rollerblade, while Dougal appears to Ted as a huge talking cigarette.
The Morality Ballad parody "Cigarettes and Whiskey and Wild Wild Women" features a spoken word introduction intoning, "A preachment, dear friends, you're about to receive on John Barleycorn, Nick O'Teen, and the temptations of Eve."
The Hombres later did a Shout-Out to this at the beginning of their single "Let It All Hang Out".
Folk duo The Wild Oats, noticing they were performing in more cafes than alehouses, parodied the song as "Juan Coffeebean".
Another name well known from British folk songs is Nancy Whiskey.
In "I Drink Alone" by George Thorogood And The Delaware Destroyers, the singer refers to his "friends" which are actually brand names for beer and liquor. These include "his good buddy Weiser", "Jack Daniels and his partner Jimmy Beam", and his "dear Old Grand-Dad".
The title character of "Panama Red" by New Riders of the Purple Sage is a particularly strong strain of marijuana who'll "steal your woman" and "rob your head."
The spoken-word recording "King Heroin" by James Brown is a first-person narrative from the drug's point-of-view on the damage he causes to people who use him.
The WASP song "Thunderhead" depicts heroin as a demon who demands that his followers ruin themselves and their families in his service, namely the title character, a man who's hopelessly addicted to it, dying of withdrawal in a detox clinic.
"That Smell" by Lynyrd Skynyrd, an anti-drug song from the 70s, uses the phrase "monkey on your back" which is a common idiom for drug addiction, usually to heroin.
One little problem that confronts you
Got a monkey on your back
Just one more fix, Lord, might do the trick
One hell of a price for you to get your kicks
The Dropkick Murphys song "dirty glass" personifies the neighborhood pub as a quarrelsome girlfriend.
"Sister Morphine" by the Rolling Stones, which is actually a song about lying in a hospital bed drugged up:
Here I lie in my hospital bed
Tell me, Sister Morphine, when are you coming round again?
"Lucy In the Sky with Diamonds" by the Beatles is widely interpreted as an anthropomorphism for LSD. (It ain't, it was actually inspired by a drawing John Lennon's son made about his classmate Lucy O'Donnell.) Doesn't mean that people don't take it that way anyway or that the song isn't pretty damn trippy:
Picture yourself in a boat on a river
With tangerine trees and marmalade skies
Somebody calls you, you answer quite slowly
A girl with kaleidoscope eyes
The song "Ebeneezer Goode" by The Shamen had people singing the chorus "-eezer Goode, -eezer Goode, he's Ebeneezer Goode" (which sounds exactly like "Es are good, Es are good...") and was filled with oblique references to taking the drug Ecstasy. Ironically, it was number 1 during the BBC's Drug Awareness Week, and even appeared on the popular BBC music show Top Of The Pops at the time. The song described Ebeneezer as "A gentleman of leisure, he's there for your pleasure" but warned that "He's the kind of geezer who must never be abused".
Classical Mythology: Dionysus (or Bacchus) was the Greek and Roman god of winemaking and wine. Eventually, he became the personification of wine itself and its positive and negative effects upon drinkers. In some later depictions, like this 1870 cartoon by Thomas Nast◊, he is shown as the embodiment of alcohol-caused human misery.
From British folklore there's the aforementioned John Barleycorn who, in some form, goes back as far as the Middle Ages.
Dungeons & Dragons module UK1 Beyond The Crystal Cave. The PCs may encounter a deity named the Green Man, who is involved with (among other things) the production of alcoholic beverages. His breath causes intoxication in any creature who breathes it. One of the names he goes by is (wait for it!) John Barleycorn.
Modern updates of the 15th Century morality play Everyman (which ordinarily features characters which are Anthropomorphic Personifications of various vices and virtues) will often include these among Everyman's temptations.
In Terence Mc Nally's play Whiskey, different brands of whiskey are anthropomorphized as performing circus cowboys who have an act together. I. W. Harper, Tia Maria, Johnny Walker, Southern Comfort, and Jack Daniels (and their horse "Whiskey"). The personality of each is based on the branding of the liquors.
Condemned 2: Bloodshot has protagonist Ethan Thomas experience hallucinations of his addiction appearing as "the alcohol demon," who sometimes gives him in-game hints. Ethan later cures his alcoholism by slaying the demon, who gets replaced by another personal demon called "Acceptance."
Tiny Toon Adventures: How I Spent My Vacation: When Fowlmouth and Shirley de Loon go to the movies there's an announcement "no smoking in the theater." Cut to a disappointed anthropomorphic cigarette being booed and forced to leave. He just wanted to see the movie!
Also played for laughs in "D'oh-in' in the Wind", where Barney experiences a Mushroom Samba from the episode's hallucinogenic juice that involves a 3-eyed monster appearing before him. He quickly downs a Duff Beer, in which "Pinky, the Pink Elephant" shows up and kills the monster.
In the Looney Tunes short Wholly Smoke, a young Porky Pig gets sick smoking a cigar and hallucinates being taunted, teased, and chased by a tobacco shop full of anthropomorphized cigarettes, cigars, pipes, and tobacco accessories led by a smoky spectre named Nick O' Teen (a different Nick O' Teen than the one that appeared in Superman anti-smoking PSAs).
One of the sequels, Pipe Dreams, to the MGM short Good Little Monkeys has the three title monkeys smoking and then encounter several anthropomorphic cigars, cigarettes, and tobacco products.