During the Xuanhe period of the Song Dynasty, Detective Zhang Xian encountered a small case of stealing nails, which unexpectedly led to his death. On the night when he was chasing the criminal, he died unexpectedly. Fortunately, he was rescued by an old man of unknown origin, and he came back to life. During the investigation process, Zhang Xian felt that the case was very strange, and it involved an experience that he had concealed for many years. Later, he experienced nine deaths and thirteen disasters, such as capturing the black fish spirit, subduing the white wolf god, accidentally rescuing the master of Futai, practicing the thunder method, playing three fox fairies, and fighting four spirits.