Mary Beth, a museum tour guide, takes a detention group on a secret tour, telling them the story of Mexican town San Angel from the Book of Life, holding every story in the world.
On the Day of the Dead, La Muerte, ruler of the Land of the Remembered; and Xibalba, ruler of the Land of the Forgotten, set a wager after seeing Manolo Sánchez and Joaquín Mondragon competing over María Posada. La Muerte bets on Manolo while Xibalba bets on Joaquín. However, Xibalba cheats by giving Joaquin his Medal of Everlasting Life, granting the wearer invincibility. María frees a herd of captive pigs, getting enrolled in a boarding school in Spain after. Parting ways, Manolo gives her the baby pig from earlier and she gives him a guitar engraved “Always play from the heart”; Joaquin keeps her bonnet.
Years later, Manolo’s dreams are suppressed by father Carlos, training him to be a bullfighter to honor their family, while Joaquín becomes a hero with the Medal’s aid. On Manolo’s bullfight, María returns. Manolo defeats the bull but refuses to kill it, dismaying Carlos and the crowd but impressing María. That night, María is pressured by father and mayor General Ramiro Posada to marry Joaquín for his protection from the bandit Chakal, the previous owner of the Medal, though conflicted. María and Manolo both profess their love before dawn, but are interrupted when Xibalba sends a dual-headed Snake to bite her once into a coma. Devastated by María’s “death”, Manolo is tricked into being bit twice, killing him.
At the Land of the Remembered, Manolo reunites with his mother Carmen and his ancestral family. They travel to Muerte’s castle, discovering Xibalba, explaining the bet and that the snake killed him. María awakens, she learns of Manolo’s death and accepts Joaquín’s proposal. Manolo, Carmen, and Manolo’s grandfather Luis travel to the Cave of Souls to reach La Muerte. They meet the Candle Maker, the overseer of mortal lives. After seeing that Manolo’s story in the Book of Life is blank and can be rewritten by thyself, he takes them to the Land of the Forgotten. Manolo finds her and exposes the cheat. Furious, La Muerte lectures Xibalba before another negotiation: Manolo’s life will be returned if he completes a challenge Xibalba sets him, but he will rule everything and forget Manolo if he fails. Xibalba manifests every Sanchez bull, which merge into a giant bull for Manolo.
In the living world, Chakal, leads his army to San Angel to find the Medal. Chakal kills Carlos, who joins to watch Manolo fight. Manolo, realizing his fear is actually being himself, refuses to fight and sings an apology, with it peacefully dissolving. Impressed, the deities grant Manolo life and send him and his family to San Angel. Manolo is seemingly killed when Chakal blows himself up, but is protected by the Medal. Joaquín returns it to Xibalba and resolves to be a hero trully, while Manolo and María wed happily as Xibalba and La Muerte reconcile.
As the children leave the museum, Mary Beth and the security guard reveal themselves as La Muerte and Xibalba, reconclied peacefully. The Candle Maker then encourages to write your own story.