An elderly woman named Gothel witnesses a single drop of pure sunlight hit the ground, creating a magical flower with the ability to keep herself young when she sings to it. Centuries later, the queen of a nearby kingdom falls ill while expecting a child. Her guards find the mysterious flower, which heals the queen and she gives birth to a girl named Rapunzel. Gothel learns that Rapunzel's golden hair retains the flower's healing abilities as long as it isn't cut, so she kidnaps the child and isolates her in a tower, raising the girl as her own daughter. However, every year on Rapunzel's birthday, the kingdom sends thousands of floating lanterns into the sky longing for their lost princess to return.
Meanwhile, Rapunzel realizes that she is actually the long-lost princess, and she confronts Gothel with the revelation. Flynn reaches the tower, but upon entering, he sees the bound Rapunzel and is stabbed by Gothel. Rapunzel pledges to remain with Gothel forever if she can heal Flynn's wounds. Gothel agrees, but Flynn, saying that he would rather die than have her trapped forever, cuts off Rapunzel's long hair, destroying its healing power. Gothel screams in horror as her true age begins to catch up to her, and as she writhes, trips on Rapunzel's hair and falls out of the tower window, turning to dust before she hits the ground. Flynn reveals his love for Rapunzel, and succumbs to his wounds. Heartbroken, she tearfully tries to sing the incantation as a single tear lands on his cheek and miraculously heals him. The group returns to the castle, where the royal family is reunited at last. In time, Flynn and Rapunzel get married, and live happily ever after as the pub thugs fulfill their individual aspirations, and Maximus becomes a respected official on the Royal Guard.