Orïsha is a land ruled by fear. King Saran fears the return of the magic that led to the assassination of his first family. The maji, or maggots, as they are called, are all that remain of a once powerful race of people endowed with gifts from the gods to wield that magic.
Zélie, a young maji, lives in constant fear of Saran’s soldiers. They dragged her mother away and killed her 11 years ago during the Raid. That night, Saran found a way to sever the connection between the gods and the maji so they could no longer use the magic. Since then, the maji have been forced into poverty and slavery, as Saran keeps them under his thumb.
Amari also lives in fear of King Saran, her father. He has forced her and her older brother, Inan, to train to fight together. Even so, she and her brother share a deep bond of love. Amari does not like how her father and other nobles treat divîners, majis who no longer have power.
Her most beloved friend is Binta, her servant, who is a divîner. When Amari believes her friend has been accused of stealing an expensive bracelet, she sneaks into the throne room to tell her father the truth. She had given the bracelet to Binta so her friend could pay the high taxes demanded by the king.
Instead of a trial, Amari sees her father’s Admiral present him with a scroll. Saran is enraged. The scroll is one of three magical artifacts that he believed were destroyed after the Raid. The Admiral confesses that the artifacts were hexed. He tried burning and ripping the scroll, but it would reassemble itself. Finally he resorted to locking it and a magic sunstone into a chest and sinking it into the ocean.
They recently washed ashore, and those maji that touch them have awakened their powers. As proof, Binta is brought forward and forced to touch the scroll. Amari is amazed when light from Binta’s hand fills the room, but then horrified as she watches her father kill Binta. Angry, Amari steals the scroll and flees the palace. With the soldiers, including her brother, pursuing her, Amari runs into Zélie in the market and begs her for help. Having just been instructed that morning to protect those who cannot help themselves, Zélie decides to aid Amari.
As Tzain, Zélie’s brother, verbally thrashes her for her recklessness, Amari’s brother, Inan, must face his father and confess his inability to apprehend the fugitive with the scroll. Expecting a beating for his failure, Inan is surprised when his father talks to him rationally. He orders Inan to search for the fugitive, admitting that the one he seeks is Amari. If Amari can be found before anyone discovers what she has stolen, she can live. As only one divîner entered the city that day, Inan heads toward Zélie’s village to find his sister.
Zélie and the others arrive back in her village. While Tzain helps their father to pack items so they can flee, Zélie talks with her mentor, Mama Agba. Once Mama touches the scroll, her ashê, the latent magic within her, comes to life. As a seer, she is given a vision of Zélie, Amari and Tzain taking the scroll to a sacred temple. Before Zélie’s fear causes her to refuse the journey, fire breaks out in the village. One of Inan’s men disobeyed orders and lit a flame before Amari had been captured.
Zélie, Tzain and Amari escape into the wilderness. As Inan surveys the burning village, he is overcome by a vision of Zélie, fleeing. He believes she has infected him with a virus of magic in order to drive him insane. Later, he draws her consciousness into a kind of dreamscape. Zélie sees the white streak in his hair, the sign of the maji, and realizes the gods have gifted Inan. He is a Connector, a maji who has power over minds, spirits and dreams. His powers were awakened when he accidently touched the scroll while trying to capture Amari. The king will kill Inan if he learns the truth, and Inan will kill Zélie so she will not reveal his magical secret.
After a difficult journey, Zélie, Tzain and Amari reach the destroyed temple. When Zélie touches one of the skulls lying in the dirt, her magic allows even Amari to see a glimpse of its former glory. They are taken captive by Lekan, the last of a tribe of guardians who connected the Sky Mother’s spirit to the maji on earth. King Saran slaughtered all of Lekan’s people to sever that connection and rip magic from the world.
Zélie must perform a sacred ritual to re-establish the bond by the summer solstice in three weeks’ time. They must find the magic sunstone and travel to a hidden island to complete the ritual. Lekan performs the ceremony necessary to open Zélie’s ashê and allow her magic to flow freely. He also gives her a third relic, a bone dagger. When he finishes, they escape from Inan, who has found the old temple. Lekan is killed, but his spirit lifts Zélie to safety. Desperate to find them, Inan opens himself to magic. Admiral Kaea, his father’s mistress, discovers his secret. He accidently kills her with his magic and continues to search for Zélie.
Zélie and the others discover the sunstone is the prize for winning a staged sea battle within a coliseum. Slaves are forced to row the ships and fight. Zélie, Tzain and Amari get themselves placed aboard a ship, and Zélie uses her newfound magic to call up an army of spirits to help them win. They give the prize money to the other slaves on their ship, but escape with the sunstone before Inan arrives.
He catches up with them in the jungle, but as he and Zélie fight, Tzain and Amari are captured by a new threat. Young divîners have made a haven in the jungle. The sunstone had been stolen from them and now they want it back. When Zélie is caught in their trap, Inan sees his chance to kill her, but when he touches her, it ignites his magic.
He has a vision from Zélie’s memory of the night his father’s soldiers beat her father and dragged her mother from their home — and of Zélie finding her mother’s bleeding body hanging from a tree. In that moment, he sees Zélie not as his enemy, but as the frightened child still grieving the loss of her mother. Inan frees her, and the two unite to save their siblings.
Amari and Tzain try to convince their captors that they are working to save magic, not destroy it, but Amari’s royal blood convinces them that both are their enemies. They beat Tzain to try and force Amari to tell what they think is the truth. Before they kill him, Inan and Zélie attack the camp.
One of the captors has command over fire and attempts to burn Zélie. Inan protects her, calling on his own magic to stop the attack. Once it is apparent they are also maji, the others back down. Zu, the group’s young leader, calls for a celebration before Zélie continues on her trek to perform the sacred ritual.
During the festivities the following day, Zélie and Inan are attracted to each other, but their brief romance is broken up when the king’s soldiers attack the camp. Zu and many other children are killed before a maji ignites himself and incinerates most of the army. Tzain and Amari escape, but King Saran captures Zélie.
She is tortured as he tries to discover who has the sacred relics. They even burn the word “maggot” into her back. Inan, who now truly loves Zélie, but fears the power of magic after seeing the destruction it can cause, does not know what to do. He does not want to kill the divîners, but he does not want Zélie to complete the ritual and reconnect the divîners to the gods.
His love for Zélie compels him to free her, but he remains behind with his father. Amari and Tzain break into the royal stronghold to rescue her. As they carry Zélie toward a hidden island, she realizes that the king’s torture has stolen her magic from her. She cannot feel the ashê anymore.
Keeping the loss of her magic secret, Zélie still seeks to perform the sacred ritual. She enlists the help of mercenaries. The mercenary army is able to take over one of the king’s ships, which is also headed to the island. They sneak past King Saran and his troops and find the temple where the ritual must take place.
When they reach it, they are ambushed. Zélie is shocked to see Inan holding her father hostage. Inan promises that if she gives up the relics, her father will be safe. He still hopes to bring peace between their people.
Desperate, Zélie agrees and turns over the scroll and the sunstone. As she leads her father away, Saran orders her to be killed. Her father steps in front of the arrow, sacrificing his life for hers. His spirit fills her body and reignites her magic.
Black spirits shoot from her, killing anyone who gets in her way as she tries to regain the relics from Inan. He turns her unbridled anger toward himself, then holds out the sacred scroll as she seeks to spear him with her magic. The shadows destroy the scroll, and he hopes, the chance for magic to fully return to the world.
In the next instant, he uses his own powers to save his father from being killed by a mercenary. The sight of his son as a maji enrages the king and he tries to kill Inan. Amari rushes to save him. After a brutal battle, she kills her father.
As the solstice approaches, Zélie searches for a way to reconnect the divîners to the gods. She cuts her hands with the bone dagger and places them on the sunstone, calling on the spirits of her ancestors to make a way. Through their power, she utters an unknown incantation.
Her mother appears and says she has always been, and will always be, at Zélie’s side. Zélie begs her to stay with her, but Mama says she must return to Orïsha. When Zélie wakes, her mercenary friends, as well as Tzain and Amari, surround her. She asks if she succeeded in bringing magic back. As an answer, Amari holds up a hand, revealing a swirling blue light of magic. Zélie’s blood chills when she sees the shock of white hairs on Amari’s head, evidence the gods have gifted her. Zélie realizes magic has come, but it is bound to the princess.