Forced by armed conflict to flee home, young Alma Madrigal loses her husband Pedro, but saves her triplets: Juliet, Pepa, and Bruno. “Miraculously” her candle acquires magical properties, frightens off pursuers, and creates a sentient home “Casita” for the life of madrigals, as well as a magical hidden city, sheltered by high surrounding mountains: “encanto”.
Fifty years later, the candle continues to burn and the city thrives under its protection. The magic of the candle endows each child of Madrigal with superhuman powers, which they use to help the villagers. However, Bruno is scolded for his gift of foresight and disappears 10 years before the main event. Meanwhile, Mirabelle, Juliet’s youngest daughter, is treated differently due to the fact that she mysteriously did not receive the gift.
Pepa’s youngest son Antonio is blessed with the ability to talk to animals, and the family poses for a photo but ignores Mirabelle. Mirabelle suddenly sees cracks in Casita and a vision of a candle flame dying out, but her warnings go unheeded when Casita appears unharmed to the others. Mirabelle decides to save the magic of the miracle.
The next day, Mirabelle talks to her super-strong older sister, Louise, who suggests that Bruno’s room, located in the forbidden tower in Casita, may hold some clues to the phenomenon. There, Mirabelle discovers a cave and finds shards of a slab of opaque emerald glass, which form an image showing her causing Casita to fall apart. After Mirabelle narrowly escapes the cave, Louise finds her gift starting to wane.
Later in the evening, Mirabelle’s older sister Isabela, who can make flowers grow at will, is to become engaged to neighbor Mariano Guzmán. Mirabelle’s older cousin, Dolores, who has superhuman hearing, blurts out that she overheard Mirabelle talking to her father about Bruno’s vision.
The Casita begins to crack again, causing all powers to fail, ruining the night and Mariano’s proposal. As everyone flees the chaos, Mirabelle follows a group of rats and discovers a secret passage behind the portrait, where she encounters a hidden Bruno.
He realized that his vision of Mirabelle could put her at odds with her family, so he broke the vision and disappeared to protect her, staying nearby within the walls of the house because he still loves them. At Mirabelle’s urging, Bruno reluctantly creates another vision that shows Casita’s imminent destruction and an image of Mirabelle hugging a young woman, whom they identify as Isabela.
Mirabelle goes to apologize to Isabella and accidentally provokes a cathartic confession: Isabella doesn’t want to marry Mariano and is actually burdened by her image of perfection. Mirabelle helps Isabela discover her true, imperfect self, and the sisters embrace. This seems to strengthen the candle and heal cracks in Casita.
However, Alma notices from afar that Isabella grows whatever she wants with Mirabelle and blames the latter for the family’s misfortunes due to the lack of a gift. Mirabelle confronts Alma, claiming that she is to blame for the enormous pressure she is putting on the family. Their argument suddenly creates a huge crack that destroys the Casita. The candle dies in Mirabelle’s arms despite her attempts to save her, leaving all the madrigals powerless.
Later, Alma finds Mirabelle crying by the river where Pedro died, and finally takes responsibility for what happened, forgetting that their real gift was not their powers, but the family itself. Mirabelle finally begins to understand her grandmother and tells her that despite her shortcomings, it was Alma who brought the family together in the first place and they reconciled.
Together with Bruno, they reunite with the Madrigals and the townspeople to restore Casita. When finished, the Madrigals present Mirabelle with a handmade doorknob bearing her initial. She installs it on the front door and Casita comes back to life, restoring the house’s magic along with all of the family’s gifts. The Madrigals then pose for another family photo, this time with Mirabelle and Bruno.