Stranded on the shores of Madagascar, Alex the lion, Marty the zebra, Melman the giraffe, and Gloria the hippopotamus decide to engineer a risky escape plan. Using a dilapidated, patched-up airplane repaired by the penguins, the animals attempt to fly back to their beloved New York zoo. However, the plane crash-lands in the vast open plains of the African continent. There, Alex is happily reunited with his birth parents, while the rest of the gang finds their respective animal communities, leading to unexpected identity crises.