In Moose Lake, Minnesota, a crate containing a young, orphaned, male blue macaw that was smuggled out of Brazil falls from a truck and is found by Linda Gunderson, who names him Blu. Fifteen years later, Blu is highly domesticated, but has not learned to fly. One day, ornithologist Túlio Monteiro arrives, informs Linda that Blu is the last known male of his species, and invites the pair to Rio de Janeiro so Blu can mate with the last known female. Although initially unsure, Linda and Blu ultimately agree. At Túlio's aviary in Rio, Blu meets his prospective mate, the fiercely independent Jewel, who longs to return to the wilderness; the pair immediately clash.
Later that night, the macaws are captured by Fernando an orphaned boy and Nigel, an escaped wicked sulphur-crested cockatoo both of whom work for a gang of bird smugglers led by Marcel, who wants to leave the country to sell Blu and Jewel on the black market. While Fernando regrets his actions, Nigel tells the macaws of his disdain for "pretty birds" after he was replaced by a parakeet on a television series. Blu's familiarity with cages allows him and Jewel to escape, alerting Nigel and the smugglers to give pursuit. The macaws are forced to travel on foot, as Marcel had legcuffs applied to both of them. Fernando helps Linda and Túlio search for the macaws the next morning. Blu and Jewel meet a toco toucan named Rafael, who says that his bulldog friend, Luiz, will remove their cuffs.
Rafael unsuccessfully tries teaching Blu to fly from the edge of a mountain with Jewel. They soon catch up with a red-crested cardinal named Pedro and his yellow canary friend Nico, both of whom Blu had met the day before. Elsewhere, Nigel coerces a horde of thieving marmosets led by Mauro to capture Blu and Jewel. To help Blu and Jewel get along better, Pedro, Nico, and Rafael take the macaws to a samba dance party, where the two begin to fall in love. The marmosets arrive and, after a brief fight breaks out, the five escape on a tram.
At the smugglers' hideout, Fernando, Linda, and Túlio discover the macaws are gone. Fernando gets Marcel's henchmen, Armando and Tipa, to reveal that they will use the Rio Carnival parade to smuggle the birds to the abandoned airport. Blu and the others meet Luiz, whose saliva allows Blu and Jewel to slip out of their cuffs. Upon release, Jewel happily flies with Pedro and Nico, triggering Blu's insecurity and causing a falling out between the two macaws. Jewel flies away in tears and Blu storms away.
While flying away, Jewel is captured by Nigel. Blu, Rafael, Nico, and Pedro rush to the parade to rescue her, only to also be captured. Elsewhere, Linda and Túlio pose as dancers in Spix's macaw costumes to find and pursue Blu, but the smugglers escape and flee to their plane. Using a fire extinguisher, Blu breaks out of his cage and quickly frees Jewel and the other birds, but Nigel attacks them and Jewel's wing is badly injured in the process. Blu activates the fire extinguisher, sending Nigel out of the open cargo door and into one of its engines. The smugglers escape the falling plane while Jewel falls out of the open hold compartment. Blu jumps out and dives towards her, intent on not leaving her behind. After Jewel kisses Blu, he finally gains his flying ability. He carries her to Linda and Túlio, who help Jewel's wing heal and recover.