The emperor falls ill
The best-known early telling is a Tang-era inscription that Shen Kuo (1031–1095) copied into his Supplementary Notes (Wikisource text). In the Kaiyuan era (713–741), Emperor Xuanzong holds a military review at Mount Li, returns to the palace, and falls ill with a recurring fever that lasts more than a month. Later retellings vary on the date, but this earliest text names Kaiyuan.
The illness matters because Zhong Kui is not introduced as an abstract deity. He arrives as a practical protector who removes a disruptive spirit.
The dream of two ghosts
The emperor dreams of a small ghost in crimson clothes, one foot bare and one shoe dangling, which steals Consort Yang's purple sachet and the emperor's jade flute. A larger ghost seizes the thief and devours it.
Asked who he is, the larger ghost answers that he is Zhong Kui, a man who failed the military examination, and that he has sworn to rid the emperor's realm of demons.
A painter is summoned
When the emperor wakes, his illness is gone. He summons the court painter Wu Daozi, describes the dream, and has him paint it. The inscription records a reward of one hundred taels of gold and a rescript from the emperor stating that the spirits answered his dream, the illness was cured, and the warrior who drove out the demon deserved praise.
From dream to New Year gift
The same text reports that in 1072 Emperor Shenzong of the Song had craftsmen copy the Wu Daozi image and carve woodblocks, and that on New Year's Eve an official delivered prints to the ministers of the two chief government offices. It is one of the earliest records of Zhong Kui pictures circulating as a seasonal gift, a custom explored in Zhong Kui and New Year protection.
Shen Kuo also argues that the name Zhong Kui existed before the Kaiyuan era, so the painting may have been the first picture of the figure rather than the origin of the name.
Frequently Asked Questions
Why is Emperor Xuanzong important to the Zhong Kui legend?
The emperor's dream gives Zhong Kui imperial recognition and connects his image with healing, protection, and official authority.
Which text records the dream of Emperor Xuanzong?
One of the earliest is Shen Kuo's Song dynasty Mengxi Bubitan, which quotes an older inscription. The Tang Yishi, quoted in the Ming anthology Tianzhongji, gives a fuller version with some different details.
Further reading
Pages we consulted for this guide, each linked where it is used above. Check them if you want to go deeper or verify a detail.
