Wang Baochuan, daughter of Tang dynasty chancellor Wang Yun, chooses the impoverished Xue Pinggui as her husband by throwing an embroidered ball. Defying her father's objections, she leaves home to live with Xue in a humble cave dwelling. After taming a fierce red-maned horse, Xue joins the army but is betrayed and stranded in Western Liang, where he marries Princess Daizhan and eventually inherits the throne. Eighteen years later, he returns to reunite with Baochuan. Following the Tang emperor's death, Xue ascends the imperial throne and names Baochuan his empress.