Blue macaws Blu and Jewel and their three children-Bia, Carla, and Tiago-are living happily in the city until Jewel realizes that her children are becoming more like humans. Meanwhile, Blu's former owner, Linda Gunderson and her ornithologist husband, Tulio are on an expedition in the Amazon and, after a fall down a waterfall, discover a quick-flying Spix's macaw that loses one of its feathers. When word gets out about this through television, Jewel believes that they should go to the Amazon to help find the blue macaws. While the kids are ecstatic, Blu is uncertain, but he is pressured into going along. Rafael, Nico and Pedro decide to come along. Luiz attempts to follow but fails. Blu brings a fanny pack full of supplies, one of which he uses mostly is a GPS, much to Jewel's displeasure.
Meanwhile, the leader of a group in a line of illegal logging named Big Boss, discovers Linda and Tulio's expedition to find the macaws and orders his henchmen to hunt them down to avoid disruptions to their work. Also, Blu and Jewel's old nemesis, Nigel the cockatoo, has survived the plane crash from the first film, but he is now unable to fly and is working as a fortune teller/con artist. When he sees Blu and his family flying overhead, he immediately decides to seek revenge on them. He enlists two minions to help him in his plans; a silent anteater named Charlie and a poison dart frog named Gabi, who is in love with Nigel. Blu and his family use a boat to get to the jungle (with Nigel's first plan of revenge being inadvertently foiled by Charlie); and, when they arrive, they find nothing. However, they are eventually taken to a flock of blue macaws that are hiding in a secret paradise land. There, they meet Jewel's stern long-lost father, Eduardo, his older sister Mimi, and Jewel's childhood friend, Roberto. Eduardo seems unimpressed with Blu's domesticated human behavior.
While searching for the macaws, Linda and Tulio are eventually trapped by the loggers. Meanwhile, Blu does his best to fit in with the flock, as his family and friends are doing, although the flock (especially Eduardo) are against humans and all things human. Meanwhile, a disguised Nigel plans to kill Blu at the new Carnival show after landing in an audition hosted by Rafael, Nico, Pedro, and Carla. When Blu tries to pick a Brazilian nut for Jewel, he accidentally tries to get it in the territory of the Spix macaw's enemies, the scarlet macaws, led by the hostile Felipe. Blu inadvertently causes war between the two tribes for food when he accidentally hits Felipe with a twig. The war turns out to be just like football (soccer), and Blu accidentally costs the flock the food when he sends the fruit ball into his own team's goal.
Blu visits Tulio and Linda's site, where he discovers that it has been majorly disturbed. After discovering the loggers are destroying the jungle, Blu sends Roberto (who followed Blu) to warn the flock as he saves Linda and Tulio. Blu persuades the macaws to defend their homes, and they easily outmatch the loggers with help from the scarlet macaws and the other animals. Big Boss tries to blow up the trees as a back-up plan, but Blu steals the lit dynamite. Nigel goes after Blu, and reveals himself as they are falling down when he tugs on the dynamite. After the dynamite goes off, Blu and Nigel engage in a battle while tangled in vines. Gabi and Charlie try to help Nigel by shooting Blu with a dart that has Gabi's poison on it, but it accidentally hits Nigel, who gives a Shakespearean death speech before seemingly dying. Gabi tries to commit suicide by drinking her own poison and the pair are seemingly dead. However, Bia reveals that Gabi isn't poisonous at all (she was lied to by her parents that she was). Nigel tries to attack Blu one last time, but Gabi showers Nigel with affection against his will. Meanwhile, Big Boss is eaten alive by a boa constrictor.
With the flock now under Linda and Tulio's protection, Blu and Jewel decide to live in the Amazon with their kids and friends, though still agreeing to visit Rio in the summer. Meanwhile, Nigel and Gabi are captured by Tulio, and are both sent back to Rio. Luiz finally arrives in the Amazon after hitching a ride with Kipo, and Charlie joins the birds' party.