In Medieval Scotland, Princess Merida of the clan Dunbroch is given a bow and arrow by her father, King Fergus, for her sixth birthday to the dismay of her mother, Queen Elinor. While venturing into the woods to fetch a stray arrow, Merida encounters a will-o'-the-wisp. Soon afterward, Mor'du, a huge demon bear, attacks the family. Merida flees on horseback with Elinor, while Fergus and his men fend off Mor'du, though the fight costs him one of his legs.
Ten years later, Merida, now a free-spirited and fiery young woman who dislikes her princess duties and is now big sister to identical triplets—Harris, Hubert, and Hamish, discovers that she is to be betrothed to the son of one of her father's allies. Elinor explains that failure to consent to the betrothal could harm Dunbroch, reminding Merida of a legend of a prince whose pride and refusal to follow his father's wishes destroyed his kingdom.
The allied clan chieftains and their first-born sons arrive to compete in the Highland games for Merida's hand in marriage. Merida twists the rules, announcing that as her own clan's firstborn she is eligible to compete for her own hand. She easily bests her suitors in an archery contest, shaming the other clans, and runs away into the forest after a heated disagreement with Elinor and destroying her tapestry. Wisps appear, leading her to the hut of an elderly witch. Merida bargains for a spell to change her fate, and the witch gives her an enchanted cake.
When Merida gives Elinor the cake, it transforms her into a bear, unable to speak but still retaining her human consciousness. Merida returns to the witch's cottage with Elinor, only to find it deserted, and discovers a message from the witch: unless Merida is able to "mend the bond torn by pride" before the second sunrise, the spell will become permanent. Merida once again tries to look for an answer, but ends up destroying the witch’s cottage. She then spends the night with her mother and teaches the queen what she knows about wilderness survival, bonding with her as a result. However, Merida soon discovers that Elinor is slowly losing her human consciousness, turning more and more into a real bear. Merida and Elinor are then led by the wisps to ancient ruins, where they encounter Mor'du. Realizing that Mor'du was the prince in the legend her mother told her, Merida vows that she will not let the same thing happen to her mother. She soon comes to a conclusion that the witch meant for her to repair Elinor's damaged tapestry, and decides to sneak back into the castle so they can find the tapestry and reverse the curse.
They return to the castle to find the clans on the verge of war, who are arguing about who shall have Merida’s hand. Merida intends to relent and declare herself ready to choose a suitor as tradition demands, but Elinor, having a change of heart, prompts her instead to insist that the firstborns should be allowed to marry in their own time to whomever they choose, and live their own lives before they feel ready to settle down. This leads to Merida conducting a beautiful speech which moves the hearts of the clans. The clans agree, breaking tradition but renewing and strengthening their alliance.
Merida sneaks into the tapestry room with Elinor. Elinor, however, begins to slip in and out of her humanity and attacks Fergus, but suddenly regains her composure and flees the castle. Mistaking the queen for Mor'du and unable to listen to Merida, Fergus pursues the bear with the other clans, locking Merida in the castle. Merida escapes with the assistance of her brothers, who have also eaten the enchanted cake and have been transformed into bear cubs. Merida repairs the tapestry and rides out after her father. Fergus and the clans capture Elinor, but Merida intervenes and stops her father before Mor'du arrives. Mor'du batters the clan warriors and targets Merida, but Elinor intercedes, holding off Mor'du and causing him to be crushed by a falling menhir. This releases the spirit of the prince, who silently thanks Merida for freeing him. Merida covers her mother in the repaired tapestry, but she remains a bear. As the sun rises for the second time, Merida realizes the mistakes she has made and reconciles with Elinor, unknowingly fulfilling the true meaning of the witch's message; to mend the bond between her and her mother, therefore successfully reversing the spell's effects on her mother and brothers.
With Mor'du gone, Merida and Elinor work together on a new tapestry when they are called to the docks to bid farewell to the other clans, and ride their horses together.