Legend of the Demon Cat (simplified Chinese: 妖猫传; traditional Chinese: 妖貓傳; pinyin: Yāomāo chuán) is a 2017 Chinese-Japanese-Hong Kongese Xianxia fantasy mystery film co-written and directed by Chen Kaige, based on the Japanese novel series by Baku Yumemakura.
The movie opens with Chunqin, the wife of an army commander, making a reluctant bargain with a talking black cat.
In exchange for the eyes of fish which are eaten by the cat, Chunqin finds a pot of coin which she shares with her husband.
The Japanese Buddhist monk Kukai is called to the imperial palace to assist Emperor Xuanzong who is cursed with a supernatural ailment.
Kukai makes the acquaintance of Bai Letian the poet whose major work is "Chang hen ge" - Song of Everlasting Sorrow (長恨歌)- the story about the life of the Emperor's favorite concubine Yang Guifei.
They research the poem being recited by Chunqin and learn that it was one that was composed at Yang Guifei's wedding banquet.
Bai Letian believes his work Everlasting Sorrow would be fraudulent if he is not able to learn the real story behind Yang Guifei's death.
They learned of the existence of the Japanese envoy Abe no Nakamaro and obtain his diary from his widow who is still in China.
They learned that during the crisis where the imperial soldiers surrounded the royal residence, they had hatched a plan to save Yang Guifei's life.
Dan Long confesses that he was aware of the plan to trick Yang Guifei and put poison into her wine so she would not suffer.
When his spirit melded with that of the cat he learned that the poison did not work and Yang Guifei was buried alive.