Long ago, a drop of sunlight became a flower capable of healing illness, decay, and injury. For hundreds of years, the flower is used by Mother Gothel to retain her youth, until soldiers from a nearby kingdom, Corona, take the flower to heal their ailing queen. Shortly afterwards, the Queen gives birth to Princess Rapunzel. While attempting to recover the flower, Gothel discovers Rapunzel’s golden hair contains the flower’s healing properties, and that cutting her hair destroys its power. Gothel abducts the baby and raises her as her own daughter in an isolated tower. Once a year, the King and Queen release sky lanterns on Rapunzel’s birthday, hoping for their daughter to see them and return to her awaiting birth parents.
On the eve of her 18th birthday, Rapunzel requests to leave the tower and discover the source of the lanterns, but Gothel refuses, claiming that the outside world is a dangerous place. Rapunzel then asks for a special paint that will take Gothel three days’ round trip to obtain and return, and Gothel accepts. Meanwhile, a thief called Flynn Rider steals Rapunzel’s crown from the palace and inadvertently discovers the tower after ditching his allies, the Stabbington brothers, during a chase between them and palace guards. Rapunzel captures Flynn then finds and hides the crown, but is unaware of its significance. She convinces a reluctant Flynn to escort her to see the lanterns in exchange for the return of the crown, as a way to prove to Gothel that she can take care of herself in the “dangerous” outside world.
Flynn takes Rapunzel to the Snuggly Duckling, a pub filled with frightening thugs, but who instead are charmed by Rapunzel’s innocence. Royal soldiers led by one of the royal army’s horses, Maximus, arrive in search of Flynn. Rapunzel and Flynn escape but are then trapped in a flooding cave. Resigned to his fate, Flynn reveals his real name: Eugene Fitzherbert. Rapunzel starts to realize that her hair glows when she sings, this is their key to escape. Her hair provides enough light to find a way out of the cave. Eugene and Rapunzel take refuge in a forest where Gothel, now in league with the Stabbingtons, gives the crown to Rapunzel and suggests using it to challenge Eugene’s interest in her.
Maximus finds the pair and tries to arrest Flynn, but Rapunzel arranges a truce in honor of her birthday. The group reaches the kingdom and enjoys the festivities, culminating in an evening cruise as the lanterns are released. There, Rapunzel gives Eugene the crown and after fulfilling her dream of seeing the lanterns in person, Rapunzel and Eugene realize they have fallen in love with each other and attempt to kiss until he sees the Stabbingtons on the shore. Eugene leaves Rapunzel and intends to hand them the crown. Instead, the brothers tie Eugene onto a boat and confront Rapunzel, lying that Eugene escaped with the crown. Gothel staged a rescue by betraying the brothers and returns with Rapunzel as Eugene and the Stabbingtons are detained.
Back at the tower, Rapunzel recognizes the symbol of the kingdom, which she had incorporated into her paintings over the years. Realizing that she is the long-lost princess, she confronts Gothel. As Eugene is sentenced to death, the Duckling regulars help him escape. He is then carried back to Gothel’s tower on Maximus. Eugene enters by climbing Rapunzel’s hair, only to find Rapunzel bound and gagged. Gothel stabs Eugene and attempts to relocate with Rapunzel, but Rapunzel agrees to lifelong captivity if she is allowed to heal Eugene. As Eugene slowly dies, he instead slices off Rapunzel’s hair, destroying its magic (turning brown) and causing Gothel’s age to catch up with her. She then trips and falls out of the window of the tower, turning into dust in the process.
A heartbroken Rapunzel mourns for Eugene. However, her tear, which still contains a bit of the sun’s power, lands on his cheek and restores Eugene’s life. The two return to the kingdom and Rapunzel reunites with her parents. Overjoyed, the kingdom breaks out in celebration, and Eugene is pardoned for his crimes. Rapunzel and Eugene eventually marry.