The story is told by Barbie to her younger sister Kelly, who is insecure in her painting abilities.Rapunzel is a young woman with long, floor-length hair who lives as a servant to the wicked witch Gothel, residing in an magically secluded manor in the woods. She finds companionship in Penelope, a young dragon and Hobie, an anxious rabbit. She spends her time painting pictures of places she dreams of going when she is free one day; Gothel disapproves of this, accusing Rapunzel of being ungrateful to the witch for supposedly saving her from abandonment as a baby.
One day, Rapunzel and her friends inadvertently open a secret passage to the basement where Rapunzel finds a gift from her birth-parents: a silver hairbrush engraved with a message affirming their love for Rapunzel; this leads Rapunzel to question Gothel's claims of her abandonment. Penelope also discovers a tunnel underneath the floor. Rapunzel follows it, leading to the kingdom outside. Outside the castle Rapunzel saves Princess Katrina from a pit trap with the help of her older brother, Prince Stefan. He tells her the trap was set by King Wilhelm, the ruler of an opposing kingdom who has an ongoing feud with Stefan's father, King Frederick. Rapunzel hurries off without learning Stefan's name to avoid Gothel discovering her disappearance. However, Gothel's pet ferret Otto, who had followed Rapunzel, informs his mistress of Rapunzel meeting a man. When Rapunzel insists she doesn't know the name of the man she met when Gothel questions her, her paintings are destroyed and her room transformed into a high tower with Penelope's father Hugo tasked with ensuring she doesn't leave. As Rapunzel sleeps, the hairbrush magically transforms into a paintbrush.
When Rapunzel attempts to use the brush, a mural of the kingdom magically appears on her wall which she discovers acts as a portal. Rapunzel uses it to meet Stefan again, though she insists he never tell her his name for fear of Gothel, and Stefan gives her an invitation to the masquerade ball that night. Afraid that her father will be punished if Gothel finds out Rapunzel has left, Penelope goes through the portal and begs Rapunzel to come back. Promising to meet Stefan again, Rapunzel paints a portal back to the tower and returns with Penelope. Back at the tower, she paints herself a beautiful costume. Unfortunately, Otto swipes Rapunzel's invitation and takes it to his mistress. Gothel cuts off Rapunzel's hair, shatters the paintbrush, and destroys the portal to the kingdom. When Rapunzel once again cannot give Stefan's name, Gothel then puts a spell on the tower to never release its lying prisoner.
With the help of her friends, Rapunzel manages to escape the tower as she never lied about not knowing Stefan's name, and Penelope flies them to the castle. At the ball, Stefan is lured outside and attacked by a disguised Gothel wearing Rapunzel's hair; at the same moment, King Wilhelm infiltrates the castle, intending to end the feud by force. Wilhelm accuses Frederick of kidnapping his daughter many years ago—the source of the feud; Gothel arrives and reveals that she was the one who took Wilhelm's daughter, Rapunzel, due to her unrequited love for him, wanting the kingdoms to destroy each other. Rapunzel arrives and Wilhelm recognizes her as his daughter. Rapunzel tricks Gothel into running into her painting of the tower, where she becomes permanently imprisoned for her lies.
Rapunzel is reunited with her biological parents and marries Stefan. The feud ends and the two kingdoms are united, as Rapunzel's dreams of freedom come true.
Kelly now feels better and begins painting after Barbie reminds her that creativity is the true magic in art.