In Medieval Scotland, Princess Merida of her vivid 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 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 a big sister of the 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 firstborn sons arrive to compete in the games of Dunbroch 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 kingdom's other clans, and rides away on her horse, Angus, into the forest after a heated disagreement with Elinor. 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 black bear, unable to speak, but still retaining her human consciousness. Merida returns to the witch's cottage with Elinor, only to find it deserted. An enraged Merida accidentally sets off a Rube Goldberg machine, 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 when she pours all the vials into the pot, she 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 concludes that by repairing Elinor's tapestry she damaged during her disagreement with Elinor, she can reverse the curse, so she decides to sneak back into the castle in search of the tapestry.
They return to the castle to find Fergus & the clans, who are arguing about who shall have Merida's hand, on the verge of war. 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. Merida's impassioned speech moves the hearts of the clans. The clans agree, breaking tradition, but renewing and strengthening their alliance.