In the second year of the Yongzheng emperor's reign, Mr. Zhang Zhongzhen passed the royal examinations with distinction and was duly assigned the position of censor in Songjiang.
He slept on a heated bed in his study but was pestered incessantly by mice scurrying to and fro between cracks in the base of the bed. Eventually the loss of sleep became intolerable, so Zhang threw some firecrackers into the holes intending to drive the mice out. But still the mice would not leave.
He then took up his gun and shot through the cracks, but the mice behaved as if nothing had happened.
Zhang then decided there must be something inside the bed that the mice wouldn't leave, so he dismantled the bed brick by brick but could find no reason for their dedication to his bed.
The study also doubled as the bedroom for his maid, and it turned out she was regularly harassed at night by someone who wore a black cloak. This person demanded sex from the maid, and if she refused, she instantly fell unconscious.
When Zhang found out about this harassment he gave the maid a jade charm he had obtained from a spiritual man, and instructed her to place it between herself and her quilt. That night the ghost in black didn't return.
However, the night after that, it did. This time, not only did it take off with the maid's underclothes, but it also desecrated the charm. Zhang was furious, so he asked a spiritual man by the name of Luo to exorcize the ghost.
Luo set up an altar and performed his various rituals for three days. The result was the capture of a raccoon-like animal. The creature was sealed in a jar and all rejoiced, wrongly assuming their troubles had ended.
That very night the ghost returned, jeering rudely at them.