Originally, Julien was intended to be a minor character with only two lines. However, when Sacha Baron Cohen auditioned for the role, he improvised not only an Indian accent, but eight minutes of dialogue for his recording. The filmmakers found Cohen's performance so funny that they rewrote the script and made Julien a much more prominent character in the story as King of the Lemurs.
Sacha Baron Cohen improvised the line "It's got a gecko on it", and all of the following dialogue related to the gecko. The filmmakers found it so funny that they went to the extra work of creating a CG gecko for the shot.
Melman the giraffe wears tissue boxes on his feet. This is a reference to Howard Hughes who was also a hypochondriac and suffered OCD (obsessive compulsive disorder). In his later years, Hughes wore tissue boxes on his feet believing this would keep away germs.
When the camera pans backward from Alex's crate in the ocean, the sea foam around him creates the head of a lion. Foam makes the face, and the absence of foam around that makes the mane. Alex is in the left eye of the face.
When Private is attempting to commandeer the oil tanker, "WHATApiece OFworkIsPenGuin" can been seen on the computer screen behind him. This spoofs the William Shakespeare quote, "What a piece of work is man!" from "Hamlet".
The scene where Alex dreams about steaks slowly falling down on him spoofs an iconic scene from the DreamWorks movie American Beauty (1999), where Lester Burnham dreams of roses falling down on his daughters friend, Angela. The same song is played in both scenes.
The penguins originated from a film director Eric Darnell was developing, called "Rockumentary", about The Beatles-like rock quartet. When that project was canceled and Darnell was moved to this movie, he incorporated the penguins into the script, changing them from musicians to military commandos.
In the original script Gloria was going to be pregnant due to being part of the zoo's breeding program and the baby was going to be born on the island and Melman, who is revealed to have a crush on Gloria would help raise the child like it was his own son. The idea was cut from the final version because the test audiences felt like the pregnancy plotline was too risky and mature for a family film especially young children who felt uncomfortable with the pairing of Melman and Gloria and may have gotten the film a PG-13 rating.
In the original movie trailer Mason the monkey was holding a martini glass while in the movie he was holding a teacup with a plate. The reason was tea and root beer were okay for the monkeys to use instead of drinking beer or wine due to alcohol references and it was not appropriate for a children's movie and may have gotten the film a PG-13 rating.
Harry Gregson-Williams, John Powell and David Newman were originally attached as the film's composer, but were replaced by Hans Zimmer. A few weeks earlier, the opposite had occurred for another film: Gregson-Williams replaced Zimmer for the scoring duties of Kingdom of Heaven (2005). A year later, the other opposite occurred for a later film: Powell replaced Zimmer for the scoring duties of Ice Age: The Meltdown (2006) and Newman replaced Zimmer for unknown reasons.
According to the audio commentary the directors of the film originally didn't want the characters to say Madagascar in the movie but they caved in and decided to let Julien introduce it later in the movie.
Plotwise, this is not dissimilar to the Disney cartoon The Wild (2006) which came out the following year and did considerably less business than Madagascar (2005). Ironically, the DreamWorks film went into production after the Disney movie in a deliberate - and successful - attempt to undermine it.
There is an episode from Friends (1994), where Ross (played by David Schwimmer) needs to find a home for his pet monkey. He ultimately chooses San Diego Zoo, the same Zoo that Melman (voiced by Schwimmer) assumes they ended up in.
Director Tom McGrath wanted Robert Stack to voice Skipper, the lead penguin. Unfortunately Stack died two weeks before the film went into production so McGrath stepped in to provide a temp voice track that eventually ended up in the finished film, which also applied to the other Penguins along with Mason, who were also voiced by members of DreamWorks Animation.
In the director's audio commentary Mort the mouse lemur who is young sweet and cute was originally going to have a joke where he was really 37 years old and the other lemurs called him on that age. But they cut it out for time issues.
The eighth computer-animated film to be rated PG by the MPAA after Antz (1998), Dinosaur (2000), Shrek (2001), Ice Age (2002), Shark Tale (2004), The Incredibles (2004) and Robots (2005) and the last to be released on VHS.
In the scene where the police raid the train station, the skipper penguin says "we've been ratted out boys". That's a reference to Batman (1989). Jack Nicholson said that exact line when him and his goons found the safe empty.
Originally Ted and Horst from All Hail King Julien (2014-2017) were going to have lines in the film and voiced by Stephen Root and Alan Tudyk in this film but the lines were cut from the film for unknown reasons however in the tv series they were voiced by Andy Richter (who also voiced Mort) and Jeff Bennett (who replaced Cody Cameron in the Tv series as Willie).
When the Penguins unwittingly tunnel into Marty's enclosure, and Skipper says to Marty 'can you keep a secret my monochromatic friend?' He is technically right, even though zebras have two-tone stripes. Monochromatic means one color. Black can always be represented as it is 0% of a color, regardless of which - as technically black is the absence of light/colour. However, to refer to white as monochromatic is somewhat strange as it uses all possible colours.
According to the early development King Julien was originally supposed to be a megaladapis (an ancestor of ring tailed lemurs) and his assistant Maurice was going to be a ring tailed lemur but were changed to a ring tailed lemur and an aye aye similarly with Melman originally an okapi this may have been due to King Julien's original design being too similar to King Louie from The Jungle Book (1967) and because giant lemurs are extinct.
Skipper refers to Marty as "my monochromatic friend" monochromic is one composed of one color (or values of one color). ... A monochromatic object or image reflects colors in shades of limited colors or hues. Images using only shades of grey (with or without black or white) are called grayscale or black-and-white instead of dictomatic.
At 48 minutes in when Alex's Statue of Liberty burns up and breaks, Alex kneels and starts shouting at the statue. This is a reference to the original Planet of the Apes (1968), though the profane words "damn" and "hell" are replaced with "darn" and "heck" respectively.