The poem 'Eight Immortals of the Wine Cup' (Yinzhong baxian) was written by the famous Tang dynasty poet Du Fu (AD 712-770) who, like many Tang dynasty men of letters, derived considerable enjoyment, and, apparently, inspiration, from drinking wine.
In his poem he chose to celebrate the drinking habits of other literary men of his time, including that of his great friend Li Bai (AD 701-62). This poem provided the subject for paintings at least as early as the Yuan dynasty (1279-1368), and appeared as decoration on porcelain in the Qing dynasty Shunzhi reign (1644-1661), although it was particularly popular in the Kangxi reign (1662-1722).
Du Fu said about the Eight Immortals:
Li Jin, Prince of Ruyang:
'Ruyang can drink three gallons [of wine] by daybreak,
But when a wine cart passes his mouth still waters,
He would prefer to take up an appointment in Jiuquan [Wine spring].'
He Zhi-zhang sits crosswise in his saddle
as if he were riding across seas
in his befuddlement he seeks a cool well
to sink into a deep sleep.
Minister Li Shi-zhi spends daily for his wine ten thousand cash
and he drinks as a whale drinks from the sea
each time his lips are so happy they burst into song
the eternal words, keep it straight, no diluting for me.
Cui Zongzhi light-hearted and carefree, handsome young master, raising the wine cup, the whites of his eyes look toward the clear sky, he sways like a jade tree in the wind.
Su Jin has made a vow to the Buddha embroidered on his vest
but for his drunkenness he takes care to forget all his rules.
Li Tai-bo drinks a gallon of wine, writes a hundred poems
then sleeps it off in the back of a wine shop in Chang-an
when the emperor asked him to board the royal barge
he shouted back, I am a drunken immortal.
Zhang Xu needs three full beakers for his art
then his brush brings fairy clouds down to the silk
his cap tossed aside in his frenzy, bareheaded before princes.