Zhong Kui (Chinese, Jap: Shoki) is a figure of Chinese mythology. Traditionally regarded as a vanquisher of ghosts and evil beings, reputedly able to command 80,000 demons. His image is often painted on household gates as a guardian spirit, as well as in places of business where high-value goods are involved.
According to folklore, Zhong Kui travelled together with his friend Du Ping from his hometown, to take part in the imperial examinations at the capital. Though Zhong achieved top honours in the exams, the emperor stripped him off his title of "zhuangyuan" because of his disfigured appearance.
In anger, Zhong Kui committed suicide upon the palace steps by hurling himself against the palace gate until his head was broken. His friend Du Ping buried him. Eventually Zhong became the King of Ghosts in Hell and one Chinese New Year's eve he returned to his hometown. To repay Du Ping's kindness, Zhong Kui gave him his younger sister in marriage.
Zhong Kui's popularity in folklore can be traced to the glorious reign of Emperor Xuanzong (712-756) of the Tang Dynasty (618-907).
The story has it that at one time when the emperor was gravely he had a dream in which he saw a small ghosts stealing a purse from his favourite concubine Yang Guifei and a flute, belonging to himself. Then a bigger ghost, wearing the hat of an official, captured the smaller ghost, tore out his eye and ate it. The bigger ghost then introduced himself as Zhong Kui and said he had sworn to rid the empire of evil.
When the emperor awoke, he had recovered from his illness. He then commissioned the court painter Wu Daozi to draw an image of Zhong Kui to show to the officials. This drawing is said to have been highly influential to later representations of Zhong Kui.