After originally being shipped off to Kenya but washing up on the shores of Madagascar after a bunch of penguins, led by Skipper (voice of TOM MCGRATH), seized control of their cargo ship, Central Park Zoo animals Alex the performing lion (voice of BEN STILLER), outspoken Marty the zebra (voice of CHRIS ROCK), hypochondriacal giraffe Melman (voice of DAVID SCHWIMMER) and the hippo of his dreams, Gloria (voice of JADA PINKETT SMITH), are prepared to fly back to New York.
With Skipper's crew of penguins -- Private (voice of CHRISTOPHER KNIGHTS), Kowalski (voice of CHRIS MILLER) and Rico -- having fixed an old plane wreck, the quartet is set for their return flight. Accompanying them are lemurs King Julien (voice of SACHA BARON COHEN) and his sidekick Maurice (voice of CEDRIC THE ENTERTAINER) and hanger-on Mort (voice of ANDY RICHTER), as well as erudite chimp Mason (voice of CONRAD VERNON) and his companion Phil.
They don't get far, however, before the plane crash-lands in an African wildlife reserve, not far from where Alex's parents, Zuba (voice of BERNIC MAC) and his wife (voice of SHERRI SHEPHERD) still live, long after their son was abducted by poachers years ago. They're obviously elated by their long lost son's return, which also holds true for Zuba's longtime rival, Makunga (voice of ALEC BALDWIN), but for a different reason. Realizing Alex isn't the type of lion who can pass the pride's ritual of passage, Makunga sees that as his chance of becoming the leader.
At the same time, Melman continues to long secretly for Gloria who's now drawn the attention of suave hippo Moto Moto (voice of WILL.I.AM), while Marty is dejected to learn that he's no longer unique as he's the spitting image of the reserve's other zebras. Meanwhile, resourceful senior citizen Nana (voice of ELISA GABRIELLI) leads a band of stranded safari tourists through the savanna, prepared to hunt some animals in order to survive. As all of that and more occurs, the quartet of zoo animals must contend with their various issues.