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.
Melman the giraffe wears tissue boxes on his hooves. 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.
(at around 1h 18 mins) 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.
The lead quartet were originally to be a lion, a zebra, a hippo, and an okapi. Melman was changed to a giraffe to make him a more familiar animal.
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. However the idea of Melman having a crush on Gloria was reused for the sequels.