In the kingdom of Martissienes, three deities shape mortal lives: the Holy First; the Divided Ones, twin gods named Félicité and Calamité who share a single body; and the Dreaded End, the god of death. When a poor huntsman and his wife learn they are expecting a thirteenth child, all three visit their cabin, each offering to claim the baby. The huntsman accepts the Dreaded End's promise: The child will never know want, will live multiple lifetimes, and will become the greatest healer the world has ever known.
The child, Hazel, grows up not with her godfather but in her parents' overcrowded home, sleeping in a barn on straw. Her parents treat her as an unwanted burden; her only ally is her brother Bertie. On Hazel's eighth birthday, her family travels to Rouxbouillet for the king's holy pilgrimage, where Crown Prince Leopold insults her poverty and throws coins at her, inciting a mob. That same day, Hazel's parents bring the children to the Divided Ones' temple to settle a debt by surrendering one child. A priestess rejects Hazel upon learning the Dreaded End has claimed her and selects Bertie instead. Hazel watches her brother dragged away in shackles.
Four years later, Hazel's godfather, who calls himself Merrick, finally appears. He pays her mother a fortune in gold and transports Hazel to the Between, a dark valley between life and death. There, he bestows the power of insight, allowing her to see what ails any person and how to cure them, gives her the surname Trépas, and leaves her alone with medical texts for a full year. On her thirteenth birthday, he moves her to Alletois, a village outside Châtellerault, where she begins practicing as a healer. When she cups her first patient's face, a shimmering vision reveals the cure, confirming the gift works as promised. Over the following year, Hazel builds a thriving practice and befriends a boy named Kieron.
On her fourteenth birthday, Merrick takes Hazel to her parents' home, now a filthy ruin. When she touches her mother's face, she sees not a cure but a bone-white skull: the deathshead, an omen that the person cannot be saved. Merrick explains that her parents' illness will spread if left unchecked, and Hazel brews a lethal tea to end their lives. Their ghosts begin following her afterward, dark figures that feed on her memories whenever her protective salt wards fail.
Hazel and Kieron fall in love. On her sixteenth birthday, Kieron proposes and they plan to elope, but the next morning he fails to arrive. Hazel finds him at his farm, incoherent from a head wound. When she cups his face, she sees the deathshead. She defies it and attempts surgery, but Merrick transports her to a vast cavern filled with candles, each representing a mortal life. He shows her Kieron's candle threatening neighboring flames, then reveals that Hazel has three candles, three lifetimes, obtained through a trade with the Holy First. Merrick gives Hazel a silver snuffer, and she extinguishes Kieron's flame, killing him.
After two years of grief, Hazel returns to Alletois, where royal guards summon her to court. King Marnaigne has the Shivers, a plague causing muscle spasms and golden fluid called the Brilliance to seep from the skin. Captain Marc-André explains that an oracle foretold a healer blessed by the Dreaded End would cure the king. At the palace, Hazel meets the royal children: sharp-tongued Princess Bellatrice, the grieving Prince Leopold, and seven-year-old Princess Euphemia. She also meets Margaux Toussaint, a young oracle who claims to have foretold Hazel's arrival. When Hazel cups the king's cheeks, she sees a tar-black deathshead.
Panicking, Hazel visits the Rift, the Divided Ones' temple, and reunites with Bertie, now a scarred member of the Fractured, a sect whose followers ritually carve their flesh. The Divided Ones give Hazel a bronze whistle and confirm a cure exists. Unable to kill the king, Hazel blows the whistle, and Calamité grants her the godsight, the ability to see as gods do, transporting her to the cavern. She transfers the king's flame onto one of her spare candles, curing him but sacrificing one of her remaining lives. Merrick discovers what she has done and reveals the Holy First is the true source of the deathshead. He forbids Hazel from sacrificing another candle, and her gift of insight vanishes.
The king recovers and appoints Hazel court healer, ordering her to replicate the cure. Without her gift, Hazel scrambles until she identifies black agar, a tree resin, as the active ingredient. The Shivers is brought under control. Leopold, stung by Hazel's criticism of his idle lifestyle, enlists as a common soldier and serves with distinction during a brief war.
Leopold returns transformed, and he and Hazel grow close. The king grows increasingly unstable, ordering the public execution of the defeated enemy king Baudouin, his wife, and their young son despite initially planning clemency. After the execution, Leopold and Hazel share a first kiss, but Marnaigne threatens Hazel when he discovers her growing closeness to Leopold. At a masquerade ball, Hazel dances with Euphemia and notices gold Brilliance transferred from the princess's cheek. Euphemia has contracted a violent form of the Shivers. Marnaigne locks Hazel in the princess's chambers and threatens to kill her if the child dies. When Hazel cups Euphemia's face, she sees the deathshead.
Margaux arrives with medical supplies but arouses suspicion. Hazel discovers Margaux is covered in the Fractured's ritual scars, and Margaux confesses: She is not a servant of the Holy First but a devotee of Calamité, blessed with the gift of discord. Jealous of Hazel's three lifetimes, she poisoned Queen Aurélie, engineered the Shivers plague, and manipulated the king. She poisoned a flask meant for Leopold, but Euphemia drank it by accident. Leopold overhears the confession. Félicité, the suppressed half of the Divided Ones, awakens and sends Hazel to the cavern with the godsight. Leopold grabs her hand and is transported too.
In the cavern, Hazel and Leopold each try to sacrifice their own candle to save Euphemia. Leopold argues that the deathshead on Euphemia was a false vision planted by Margaux's gift rather than a genuine order from the Holy First. Through the godsight, Hazel watches Margaux stab Marnaigne in the throne room; both die, the king's candle flaring and melting before her eyes. Hazel and Leopold struggle over the remaining candles, each trying to give theirs to save the princess. One wick sputters out; from the darkness, a new flame sparks to life.
In the epilogue, 99-year-old Hazel sits in Alletois as her elderly husband brings her a spiced nut cake with a single candle. Leopold abdicated after his father's death; Bellatrice was crowned queen. Hazel and Leopold married, raised children, and grew old together. As Hazel senses her candle's final flicker, Merrick appears, weeping with pride. She asks him to stay until the end, and as morning light fills the room, Hazel sees a wondrous light beyond the dark.