Gyokuei begins as a young novitiate monk accompanying Arikoto Madenokoji to Edo Castle. Both are forcibly returned to secular life under pressure from Lady Kasuga and admitted into the Ōoku as part of a scheme to produce an heir for the Tokugawa lineage. Serving alongside Arikoto, Gyokuei witnesses the revelation that the original male Shogun Iemitsu died of the redface pox and that Chie, Iemitsu's illegitimate daughter, was impersonating him to maintain stability.
Within the Ōoku, Gyokuei endures significant trauma, including gang rape by rivals seeking to undermine Arikoto. He also participates in framing another concubine for the killing of Arikoto's cat, Murasaki, highlighting the brutal political intrigues. As a concubine to Chie, who becomes the female Shogun Iemitsu, Gyokuei fathers three children with her, including the future Shogun Tsunayoshi. After Iemitsu's death at age 27, Gyokuei assumes Buddhist vows, changes his name to Keishō-in, and departs the Ōoku, though he maintains connections to Tokugawa affairs.
Later, Gyokuei returns to a political advisory role during his daughter Tsunayoshi's reign. He strives to protect the shogunate by emulating his mentor Arikoto's methods, facing immense strain from Tsunayoshi's volatile behavior and the relentless scheming within the Inner Chambers. His efforts to navigate these complexities underscore his enduring dedication to the Tokugawa legacy.