In the second year of Zhide, the Tang dynasty is on the brink of a decisive battle with the An Lushan rebels. Wang Zhen was ordered to infiltrate the rebel army for ten years. Under the assumed name Wang Yue, he rose to become a deputy military commissioner, but after contact with his intelligence network was severed, the imperial court suspected he had defected. His daughter, Wang Chang'an, shaves her head and becomes a nun at Xiangji Temple in search of her father, only to stumble into an intelligence war that will determine the fate of 150,000 Tang soldiers.
Though father and daughter are close at hand, they cannot acknowledge each other. Each fights their own battle between the enemy camp and the ancient temple. Chang'an risks her life to retrieve from an underground palace a list of rebel informants left behind by her father, while Wang Zhen sends out crucial intelligence from within the rebel ranks that will decide the outcome. On the day of the bloody battle at Xiangji Temple, the Mo Dao formation advances like a wall, and father and daughter reunite amid a mountain of corpses and a sea of blood. Wang Zhen pays for sending out the intelligence with his life. The Tang army wins a great victory, and both capitals are recovered.
After the war, Wang Zhen is cleared of the charges against him, and father and daughter are finally reunited. Years later, Chang'an keeps watch alone over Xiangji Temple. Beneath the red bean tree, the sound of her zither never ceases. She keeps a lamp burning for those who gave their lives in the shadows of history.