In Spain during 1944, soldiers of Franco's fascist government are trying to find and destroy resistance fighters hiding in the mountains. Mostly peasants, the guerillas still believe in equality and land reform. Captain Vidal (Sergei Lopez) leads an army regiment; he has converted an old mill into military headquarters in the rural area.

Carmen (Ariadna Gil) and her daughter Ofelia (Ivana Baquero), a little girl who loves reading fairy tales, are traveling to join him. Carmen is pregnant with a baby the captain is convinced will be his desired son. Ofelia misses her own father, a tailor who died several years ago. At a rest stop, the little girl meets a friendly dragonfly whom she takes to be a fairy welcoming her to a new adventure.

Ofelia is not impressed with Captain Vidal, a man who wields power unmercifully and enjoys ordering others around. When Carmen is confined to bed awaiting the baby's birth, the little girl overhears Vidal tell the doctor he wants him to save the baby, even if it means the mother dies.

Ofelia does immediately take a liking to Mercedes (Maribel Verdu), his housekeeper, who has a kind heart and is attentive to the little girl's feelings. The mill is a scary place, full of odd sounds at night, so Ofelia is happy to see the dragonfly in her room and delighted when he metamorphizes into a fairy. He leads her to a labyrinth nearby and into a chamber where she meets a faun (Doug Jones), who looks more fearsome than he really is. He tells her that she is the legendary lost Princess Moanna, daughter of the King of the Underworld, who can return to her kingdom and live forever once she accomplishes three tasks.

For Ofelia, who would prefer to live in the realm of imagination, this is welcome news, but the tasks, which must be completed before the full moon in just a few days, require her to face some dangerous situations with the Captain. Ofelia needs all her resilience and courage as she confronts an odious toad in a cavern underneath a huge tree, deals with a grotesque monster seated at a table filled with tempting food, and then faces a challenge that involves spilling the blood of an innocent.

Mexican writer and director Guillermo del Toro has created a bizarre and yet oddly engrossing adult fairy tale. Like some of the classic fairy tales of old, this one builds its story out of very real fears of losing loved ones, not being able to escape terror, making bad choices, and not being remembered. The director is also interested in what emerges on the other side of nightmarish difficulties. In an interview, he has stated:

"I know for a fact that imagination and hope have kept me alive through the roughest times in my life. Reality is brutal and it will kill you, make no mistake about it, but our tales, our creatures, and our heroes have a chance to live longer than any of us. Franco suffocated Spain for decades as he tried to fashion it after what he believed to be 'good for her.' Yet Spain didn't die; she exploded, vibrant and alive."

At the heart of this fairy tale is a tribute to sacrificial love. On the other hand, the film reveals the terrible violence human beings are capable of unleashing upon each other in the name of politics, nationalism, and other isms. Although the alternate world that Ofelia travels through to prove her powers is quite scary for her, it is child's play in comparison to the butchery and barbarity of the conflict between the fascists and the guerillas. Captain Vidal is a triple threat as a chauvinist, a zealous soldier who looks forward to dying valiantly in battle, and a sadistic man who enjoys torturing captured guerillas or suspected collaborators. Be forewarned: the R rating for this film is for graphic violence, and that is no exaggeration.