Ofelia (Ivana Baquero) does not die at the end of Pan's Labyrinth (2006).
In the climax, Ofelia completes the faun's three tasks. She refuses to harm her infant brother, choosing self-sacrifice instead. The faun reveals this was the final test—she chose innocence over power. She is then transported to the magical kingdom (the "true" world) where she reunites with her real parents (the King and Queen of the Underworld) and becomes a princess.
In the mortal realm, Ofelia's body is found by Mercedes and the rebels. She has bled out from the Captain's gunshot—but the film's final moments show her spirit ascending to the magical kingdom, whole and alive. The ending is bittersweet but not a death in the narrative's internal logic: she transcends to her true home.
Her physical body dies. But the film's fantasy framework establishes that her real life begins after. Guillermo del Toro has confirmed: Ofelia passes the test and gains immortality in her true kingdom. She doesn't "die"—she returns.