In the glorious Tang Dynasty city of Luoyang, Ye Yuan'an, the daughter of a Ministry of Revenue official, is a spirited young woman who loves to fight for justice. While investigating the murder of a courtesan, she stumbles into an unlikely partnership with the brave constable Zhao Lanzhi. Solving cases side by side, the two grow close and come to understand each other deeply. Yuan'an also rescues a mysterious, amnesiac man named Mu Le from the marketplace and takes him in as a household servant. To her surprise, the single-minded Mu Le becomes utterly devoted to her, and his loyalty gradually blossoms into an obsessive love. Across cases involving the Luotian Cave and the Prince Jing's mansion, the trio works in tight coordination, cracking one baffling case after another and thwarting the schemes of the Imperial Preceptor Tianqiao, who lurks behind these crimes in pursuit of the supreme treasure, the Nine-Star Prayer Bead. Tianqiao's disciple, Princess Minghui, falls for Lanzhi and forces him into marriage by threatening Yuan'an's life. Heartbroken and feeling abandoned, Yuan'an defiantly decides to marry Mu Le, but Mu Le misinterprets her intentions. In his sorrow, Mu Le discovers that he is in fact a prince of a foreign land, stranded far from home. He steals the Nine-Star Prayer Bead, which is inscribed with arcane and wondrous arts, and returns to his homeland to seek revenge. Yuan'an, Zhao Lanzhi, and Minghui pursue him, and together the four of them quell the turmoil, finding true love along the way.