The film starts with an enormous celebration going on across Rio de Janeiro. In the bird community of the city, we catch up with blue macaws Blu (Jesse Eisenberg) and Jewel (Anne Hathaway), now married with three kids. They dance and sing together with their pals Raphael (George Lopez), Pedro (will.i.am), and Nico (Jamie Foxx). Blu asks Raphael where the kids are. Raphael says he left them with the bulldog Luiz (Tracy Morgan). Luiz says he left them with the little bird Tiny (Kate Micucci). The kids - Carla (Rachel Crow), Bia (Amandla Stenberg), and Tiago (Pierce Gagnon) - tied Tiny up to a bunch of fireworks. Their parents come flying in to prevent them from lighting them when Blu grabs the match. However, he burns himself and causes the fireworks to light up. He gets Tiny out but gets himself caught, and is launched into the sky as the fireworks erupt in an epic display, for all of Rio and the birds to see.
Blu's owner Linda (Leslie Mann) and her husband/fellow bird lover Tulio (Rodrigo Santoro) are sailing on a boat in the jungle to bring a plump red bird back to its habitat with its family. They don't notice the waterfalls up ahead and they fall over the edge, but they're both okay. A bird flies overhead and drops its feather. Tulio grabs it and inspects it. It's a feather of a blue macaw.
News gets out that Linda and Tulio discovered more blue macaws out there. They decide to travel to the Amazon jungle to find this flock. Jewel wants to travel there as well since she feels Blu has domesticated their kids too much, and they must stay in touch with their bird nature. Nico and Pedro wanna join so they can scout for exotic talent for their little Carnival show. The only person they have so far is Raphael's wife Eva (Bebel Gilberto), who is an awful singer. Meanwhile, a sinister logging tycoon known only as Big Boss (Miguel Ferrer) gets wind of Linda and Tulio's mission, fearing they will interfere with his plans.
Blu guides himself, along with his family and friends, to the Amazon with human equipment, like a GPS. They keep getting lost until they fly together as a group. On the ground, the evil cockatoo Nigel (Jemaine Clement) is now a flightless performing bird in a market, along with Gabi the poisonous tree frog (Kristin Chenoweth) and Charlie the anteater. Nigel is forced to be a fortune telling bird, while Gabi swoons over him, helplessly in love. Nigel spots Blu and his family flying up ahead, driving him to seek revenge against the bird that cost him his flight. He causes a fiasco at the market, releasing Gabi and Charlie. He rides on Charlie's back with Gabi to chase after the birds.
Nigel, Gabi, and Charlie sneak on board a boat on their trip to catch Blu. Nigel falls asleep, and Gabi sings the song "Poisonous Love" to express her feelings for Nigel, and the fact that she can't touch him because she is poisonous. When he wakes up, they spot Blu and his family on the boat. Nigel goes to make his killing move, when Charlie gets stuck in a bottle while trying to eat some ants. He pulls it off and hits an alarm, causing a commotion on the boat that foils Nigel's plan.
Big Boss also comes into the Amazon jungle to meet with his associates. He orders them to get rid of Linda and Tulio, for they are searching for macaws in an area that he plans to cut down.
Upon arriving in the jungle, Blu is snatched up by another bird, leading him and his family and friends to find the whole flock of blue macaws. They're led by Eduardo (Andy Garcia), Jewel's father. They have a tearful reunion after being separated by loggers. This caused Eduardo to have a distrust for humans. He greets Blu and his grandchildren. Also joining the party is Jewel's old childhood friend Roberto (Bruno Mars), who sings a smooth ballad to welcome Jewel back to her home, along with Jewel's Aunt Mimi (Rita Moreno). Roberto lets Blu and his family stay inside a tree that he remodeled himself. Although Blu is not comfortable with this new setting, he can see that Jewel is happy.
Eduardo decides to take Blu around the jungle in what he tells Jewel is sightseeing, when it is really a series of tests for Blu to prove his worth in the jungle. He gets hurt more than once, and appears to pale in comparison to Roberto, who always receives praise from Eduardo. They also encounter the rival tribe of scarlet macaws, led by Felipe (Philip Lawrence). They taunt and antagonize Eduardo for trying to help someone like Blu. Blu only ruffles up Eduardo's feathers (sorry) by trying to utilize Linda's equipment in the wild. Eduardo orders Roberto to keep an eye on Blu, fearing he is in league with the loggers.
Elsewhere, Nico and Pedro continue their talent search with Raphael. Carla joins them, having a knack for performing and an interest in music as well. Most of the people that come to audition for the show have exceptional talent, but they keep eating each other alive...literally. However, they get a surprise visit from Nigel (in disguise), who performs with Gabi a very entertaining rendition of "I Will Survive". At the same time, Linda and Tulio are discovered by Big Boss and his men after the logger's monkeys searched for them. The villains tie Linda and Tulio together to a tree as they go off to cut more down.
Blu goes to get a Brazilian nut for Jewel, since they're her favorite. The loggers' monkeys trick Blu into flying to the scarlet macaws' territory. He tries to take the Brazilian nut, unaware that it belongs to them. He causes the scarlet macaws to challenge the blue macaws to a game that is the bird equivalent of soccer. After not letting Blu join the game, Eduardo reluctantly lets him join when he sees that most of his players are getting taken out. Although Blu appears to be skilled, he ends up scoring the winning goal for the opposite team. Eduardo berates Blu for his failure, leading Blu to feel unwanted and unneeded in this place. He argues with Jewel, who tells him to choose where he prefers to stay.
Feeling conflicted, Blu flies somewhere away from the tribe, causing Jewel to think he's abandoning them. Instead, he comes across Linda's campsite to say goodbye, knowing he belongs with Jewel in the place where she feels happy. Blu then senses that something is not right. He finds Linda and Tulio tied together. He sets them free and discovers the loggers wreaking havoc in the jungle. Many trees are cut down and hauled off. Roberto finds Blu in this spot, causing the bird to recount a traumatizing encounter with humans. Blu has him fly back to the tribe so they can warn everyone together about the loggers. Blu convinces Eduardo to join forces so that they can save their home.
The loggers start to make their way into the deeper part of the jungle. Linda and Tulio stand in front of the bulldozers to stop them, but what makes the villains stop is seeing the entire flock of blue macaws sitting in the trees, looking very unhappy. The scarlet macaws call a truce to help save the forest, along with the other animals. Everybody swoops in to attack the loggers and frighten them away, but Big Boss shows no fear to the animals. He drives a vehicle into the forest, but Linda holds him off in a bulldozer that she commandeers. Eduardo is caught in the middle of them, but he is rescued by Tulio. Big Boss starts to set off some dynamite strapped in the trees. Blu spots them and pulls them off, with Nigel following. Blu grabs the dynamite and flies high up with them, and Nigel grabs on. The dynamite is flung into the air, and Nigel then jumps onto Blu, revealing himself to his nemesis. An explosion rings out as the dynamite blows up, throwing the birds into the trees. They fight while tied together, giving Gabi a chance to take a toothpick swabbed with her poison to shoot at Blu. She accidentally hits Nigel, who thinks he is going to die. He does an incredibly theatrical death, with Gabi swallowing a drop of her poison to be with Nigel. Bia points out that Gabi isn't poisonous, and that it's a common misconception. Overjoyed at this revelation, Gabi grabs Nigel so they can be together, to his dismay. Meanwhile, Big Boss is swallowed whole by a snake.
The jungle is saved, and Eduardo accepts Blu as part of the tribe. Nigel and Gabi are sent to Rio to be studied. Charlie ditches them. Blu decides to stay in the Amazon with Jewel and his family, but they agree to visit Rio during the summer.
The film ends with the animals putting on Nico and Pedro's Carnival show, with Carla joining in the celebration.