In honor of the coronation of the first ever female Chinese Emperor, the soon to be emperor is building a giant statue of Buddha in front of the palace to be completed by the ceremony.
While guiding visiting dignitaries through the statue, the inspector mysteriously, spontaneously combusts. The workers blame it on having previously moved sacred amulets from around the central pillar while inspecting the work. Then one of the officials investigating the crime also mysteriously combusts while reporting to the empress.
The Imperial Chaplain appears to the court in the form of a stag, and tells her that in order to solve the case, she will need to release Detective Dee from prison, where he was sent 8 years previously for opposing her regency. She does so and sends her trusted servant Pei to keep an eye on him.
Pei, Dee and an albino official named Shatuo go back to the statue where one of Dee's old friends, who was in charge of construction and was punished for having been involved with Dee's treason 8 years earlier by having his hand cut off, tells them about a bug that contains a poison. Once the poison is drunk, the person will burst into flame when exposed to sun light.
After many false leads, Pei is revealed to have been the Chaplain all along, to draw negative attention away from the empress, and is killed.
Shatou discovers the plans the inspector found, and is killed.
Dee returns to the statue and reveals to his friend that the inspector discovered that when moving the amulet, the statue was designed to collapse on the palace during the coronation and kill the court, where upon a rebel army would overtake the capital.
Dee fights his old friend, but they both get bitten by the poisonous bugs. The friend is killed when he is exposed to sunlight. Dee manages to hide in the shade until he can get to the empress and protect her from the falling statue. He tells her of the plot and acknowledges her as Emperor. He leaves, and the Empress quickly rallies her troops to stop the rebels.
At the end, Dee has moved into a mystic underground ruins that they previously visited during the investigation, and can only come out at night, or the poison will kill him.