Feng Qi Wu Tong: The Xuanji Gambit centers on court intrigue and tangled relationships, telling the story of Wan'er after she enters the palace, through a series of dramatic events spanning Yonghe Years Three to Seven.
In Yonghe Year Three, Wan'er enters the palace with the Xuanji Diagram to solve the Empress Dowager's chess puzzle, only to cough up blood before the emperor, revealing her frail condition. After that, a blood-red celestial omen appears over Taiye Lake, the Imperial Astronomical Bureau is silenced, and one mystery after another unfolds: the emperor's double identity, the appearance of the Snow Wolf Guard, and more. The mysteries also lead to the old case of the late empress's sudden death and a palace maid's self-immolation at the Laundry Bureau. Wan'er establishes the Xuanji Pavilion and recruits intelligence agents. The Empress Dowager arranges a marriage with the legitimate daughter of the Situ family, and Wan'er is confined to the Cold Palace.
In Yonghe Year Four, cheating in the imperial examinations throws the court into turmoil, and a secret letter from the Northern Di is discovered in the Chancellor's residence. Various factions struggle behind the scenes over a border defense map, poisonous insects, and more. One incident follows another: the empress fakes a pregnancy, an attack during the autumn hunt, and poison hidden in the strings of the Jiaowei zither. In the imperial mausoleum's underground palace, an ice coffin is found holding a princess from the previous dynasty who looks just like the Empress Dowager. Meanwhile, the people make a vow using silver bells.
In Yonghe Year Five, the heroine miscarries and discovers a poisonous insect, while a female parasite is found inside the emperor. Wan'er matches wits with the Empress Dowager to exchange for an antidote, only for the emperor to force her to drink poisoned wine. A fake-death drug sparks a palace coup by the Situ family; the empress reveals that she is the Northern Di's eldest princess; and the Snow Wolf Guard lays siege to the city. Wan'er leads the female officials in breaking through the formation and setting the Situ residence ablaze. The Empress Dowager activates a blood puppet Gu formation, and the Tianshu Envoy dies.
In Yonghe Year Seven, the Shadow Guards and Snow Wolf Guard fight in the streets. The emperor kills Situ Rui, and the woman in the ice coffin identifies Wan'er as a descendant of the Nan Zhao royal line. The Empress Dowager suffers a backlash from the Gu King and hands over the remaining pages of the Xuanji Diagram, bringing the truth of Wan'er's origins to light. Afterward, the female officials' system is reformed. The emperor personally leads an expedition and takes an arrow meant for Wan'er. She saves him with the Seven-Star Life-Prolonging Lantern. In the end, the emperor and empress retire to Jiangnan, burn the Xuanji Diagram, and begin a new chapter.