The story was conceived by Robert Rodriguez's then seven-year-old son Racer Rodriguez, who receives an on-screen "Story By" credit. Max is named after Racer's middle name (Racer and Robert also provide the audio commentary for the DVD and Blu-ray together).
Miley Cyrus had auditioned for the film with Taylor Lautner, and said it came down to her and Taylor Dooley for the role of Lavagirl, who was also auditioning; however Miley began production on Hannah Montana (2006) and was forced to back out. AnnaSophia Robb, Taylor Momsen, and Dakota Fanning where all also considered for the part of Lavagirl, but had other projects to attend to.
Taylor Lautner's martial arts skills helped him to obtain the role of Sharkboy. "When I auditioned for the film, Robert Rodriguez, the director, didn't know that I had my martial arts background, and while we there in Austin, TX he saw a DVD of me and asked me to choreograph my own fight scenes", said Lautner.
According to Lautner and Dooley, when filming the scene with the dream train, the front part of the train was an actual physical set piece: "The whole inside was there and when they have all the gadgets you can pull on, that was all there but everything else was a green screen," said Dooley.
Robert Rodriguez appears in the credits fourteen times, most notably as director, a producer, a screenwriter (along with Marcel Rodriguez), visual effects supervisor, director of photography, editor, a camera operator, and a composer and performer.
You can spot a paper bag, soda cup and a hamburger in the opening scene where Max is telling Sharkboy's past if you look close enough you can read the name on the bag and cup "Big Kahuna" a nod to Quentin Tarantino.
Around the time of the film's debut Rodriguez co-wrote a series of children's novels entitled Sharkboy and Lavagirl Adventures with acclaimed science fiction writer Chris Roberson. They include Book 1, The Day Dreamer, and Book 2, Return to Planet Drool, which announces that it will be continued in a third volume, Deep Sleep, which has yet to appear. They are illustrated throughout by Alex Toader, who designed characters and environments for the film and the previous Spy Kids franchise.
Every character that appears in Max's dream world based on a person in his life is modeled after their defining trait. Cookie Giants who are based on his parents are based on their specialty of giant cookies. Ice Princess is based on his classmate Marissa who was always cold from sitting underneath the air conditioner. Mr. Electric and Minus are villainous characters due to Max's antagonistic relationship with Linus and Mr. Electricidad (more so with Linus).
Parts of the film were shot on location in Texas, where Max resides and goes to school in the film. Much of the film was shot in a studio against green screen. Most of the ships, landscapes and other effects including some creatures and characters, were accomplished digitally.
Max's parents are constantly seen fighting in the film, in the third act when they are fleeing from the tornado it is implied that they were on the verge of divorce as Max's mom says "I thought you wanted me gone?" to her husband and he confirms that he still loves her before she is sucked into the tornado only to be saved by Lavagirl. A factor that probably played into Max's obsession with his imagination as a way to cope.
Eleven visual effects companies (Hybride Technologies, CafeFX, The Orphanage, Post Logic, Hydraulx, Industrial Light & Magic, R!ot Pictures, Tippett Studio, Amalgamated Pixels and Intelligent Creatures and Rodriguez's Texas-based Troublemaker Digital) worked on the film in order to accomplish over 1,000 visual effect shots.
When Max and Linus / Minus are having their dream battle, as Max summons a brain storm Linus / Minus flings one of the brains to the screen essentially breaking the fourth wall by having a brain quite literally hit the fourth wall.
The Total Nonstop Action professional wrestler Dean Roll, who trademarked the name "Shark Boy" in 1999, sued Miramax on June 8, 2005, claiming that his trademark had been infringed and demanding "any money, profits and advantages wrongfully gained". In April 2007, the suit was settled for an disclosed amount of 200,000.