The earliest traces
The name Zhong Kui appears in writing earlier than the story that made him famous. A 706 edition of the rhyme dictionary Qieyun already lists the name in a context that implies a deity rather than a person — which tells us that by the early eighth century, Zhong Kui was already someone people knew about, not someone a single author invented.
That matters for how you read everything that follows. The Tang-dynasty story is not the origin of Zhong Kui; it is the version that stuck.
The Tang story
The version most people know is set in the reign of Emperor Xuanzong (712–756). It has four beats.
The examination. A scholar from the Zhongnan Mountains, brilliant and hideous, sits the highest level of the imperial examination and passes at the top.
The rejection. The emperor, presented with the results, cannot accept a man who looks like that in his civil service. The honours are withdrawn.
The death. Zhong Kui kills himself on the palace steps, in protest and in despair.
The appointment. In the underworld, the king of the dead recognises the injustice done to him and gives him authority over ghosts. He becomes the one who catches what other officials cannot see.
The story is a bureaucratic tragedy. Its engine is not magic but procedure: a result is annulled, a man is destroyed by a formality, and the afterlife offers the only promotion available to him.

The dream and the painting
The most famous episode comes later in the same tradition. Xuanzong falls ill, tormented by a small demon — often described as a thief who steals the emperor's treasures, or as a spirit that comes to him at night. Zhong Kui appears in the dream, seizes the demon, and eats it.
The emperor wakes cured. He tells the court painter Wu Daozi what he saw and asks for a portrait. Wu Daozi paints it; the picture is said to be so exact that the emperor recognises it instantly. From that moment, Zhong Kui's image exists as an object — something to hang, copy and distribute.
This is the key move in the whole tradition. Zhong Kui becomes powerful not through worship but through reproduction: the painting is the technology.
What later writers recorded
The story survives because a series of literate, sceptical people wrote it down:
- Shen Kuo (1031–1095), the polymath who wrote Dream Pool Essays, records the Xuanzong dream and the Wu Daozi painting, and notes that Zhong Kui pictures were already a standard New Year item in his own time.
- Liu Yuxi (772–842) mentions that Zhong Kui portraits were given to officials as a New Year gift — evidence that by the ninth century the image had become an item of court protocol, not just a folk charm.
- Yuan-dynasty painters in the thirteenth century turn him into a subject for narrative scrolls: Zhong Kui on a Journey and, most famously, Zhong Kui Marries Off His Sister, which takes the story in a domestic direction the Tang sources never did.
The sister
Zhong Kui Marries Off His Sister deserves its own paragraph, because it is the part of the legend most likely to matter for the game.
In the story, after his death, Zhong Kui's sworn brother Du Ping buried him and looked after his sister. Zhong Kui later returns to arrange her marriage to Du Ping — a ghost, hosting a wedding, to discharge a family obligation.
The tale is usually read as a pun: the sister is a "marriageable demon" (嫁魅), and the story is about marrying off misfortune as much as marrying off a woman. Whatever the etymology, the effect is to give Zhong Kui a household, a debt and a friend — which is why the Du Ping theory about the game's protagonist has traction.

Where the story goes next
There is no single canonical text of the Zhong Kui legend — no scripture, no authorised biography. There are paintings, local customs, opera libretti and regional variations, and they disagree with each other. That looseness is exactly what makes the figure useful to a game studio: it can take the parts it needs.
For how the figure is used in practice, see folk customs. For how he looks, see reading the image.