A modern criminal psychology expert transmigrates into the body of a demoted county magistrate during the Kaiyuan era of the Tang Dynasty. Burdened with a Detective System, he must solve cases and earn points to return to the modern world. Using modern forensic techniques to crack cases in ancient times, the protagonist unwittingly becomes entangled in a vast conspiracy to overthrow the Tang Dynasty, and his actions begin to influence the course of history.