Max (Cayden Boyd) is a lonely child in the suburbs of Austin who creates an imaginary world named Planet Drool, where all of his imagination and dreams come to life. He creates two characters; Sharkboy (Taylor Lautner), a young boy who was raised by sharks after losing his father at sea, and Lavagirl (Taylor Dooley ), who can produce fire and lava, but has trouble touching objects without setting them alight. The two left Max to guard Planet Drool. In real life, Max's parents (David Arquette and Kristin Davis) have little time for him and their marriage seems to be on the rocks, and he is bullied by fellow schoolmate Linus (Jacob Davich). However, he does receive friendship from Marissa (Sasha Pieterse), the daughter of his teacher Mr. Electricidad (George Lopez, whose name is Spanish for "electricity"). Linus steals Max's Dream Journal (where all of his ideas are kept) and vandalizes it. The next day, a tornado rages outside the school, and moments later, Sharkboy and Lavagirl appear and ask Max to come with them to Planet Drool. They reach Planet Drool via a shark-like spacecraft, where Max learns that the dreamworld is turning bad, courtesy of Mr. Electric (also portrayed by George Lopez), originally the dreamworld's electrician but now corrupted.
Sharkboy and Lavagirl save some children from an out-of-control roller coaster. Then with Max, they confront Mr. Electric, who quickly drops them in a part of Planet Drool called the Dream Graveyard, where some of Max's dreams have been dumped. They find Tobor (voiced by George Lopez), a robot toy that was never finished being built by Max, but offers them a lift to other parts of the planet (in which they ride on his eyes and mouth since he can't move the rest of his body parts). Whilst on the journey, the three form a friendship but they face hardships, such as Sharkboy's anger for the oceans being frozen over, and Lavagirl's desperation to find her true purpose on Planet Drool. They are pursued by Mr. Electric and his "plughounds" across the planet. They plan to visit the Ice Princess and obtain the Crystal Heart, which can freeze time, giving them enough time to get to the center of Planet Drool and fix the dreamworld using Max's daydreaming. However, they are captured by Mr. Electric and delivered to Linus's Planet Drool incarnation Minus, who has altered the dreamworld with Max's own Dream Journal and traps the three in a cage. Sharkboy gets annoyed by Lalas and has a shark frenzy, destroying the cage. Max retrieves the Dream Journal from Minus while he is sleeping, after the three escape. Max informs Sharkboy that his father is alive in his book, but when Lavagirl wishes to find out what it says about her true identity, she burns the book to ash. In rage, Lavagirl asks him why she was made out of lava, but Sharkboy tells max to let her cool down.
With little time left, Max, Sharkboy and Lavagirl reach the Ice Princess (Sasha Pieterse) after an encounter with the Ice Guardian (voiced by George Lopez). She hands over the Crystal Heart, but they find they are too late to stop the corruption since the ice princess is the only one who can use the Crystal Heart's power and she cannot leave her home. Mr. Electric fools Sharkboy into jumping into water filled with electric eels, seemingly killing him. Lavagirl jumps into the water to retrieve Sharkboy but dies moments later. Tobor's face appears and convinces Max to dream a better and unselfish dream, which in turn revives Sharkboy, who then races Lavagirl to a volcano where she is revived. Max witnesses her revival and concludes that her purpose is as a light against the dark clouds which have slowly engulfed Planet Drool's skies. Max gains reality warping as the Daydreamer and battles Minus, defeating him, and offering to make a better dreamworld between the two of them, which Minus agrees to.
Mr. Electric refuses to accept the new dreamworld, and flies off to Earth to kill Max while he is dreaming. Max awakens back in his classroom in the middle of the storm. Mr. Electric materializes before Max and an astonished Mr. Electricidad. Max's parents get sucked into the storm, but are saved by Sharkboy and Lavagirl. Max gives the Crystal Heart to Marissa, allowing her to gain the Ice Princess' powers, which she uses to freeze and destroy Mr. Electric. Mr. Electricidad, Linus and Max all make peace with one another, and Max is reunited with his parents.
In the end, Max informs his class that Planet Drool became a proper dreamworld again, Sharkboy became the King of the Ocean, and Lavagirl became Queen of the Volcanoes, including aquatic ones, and as the film shows Max finally finishing Tobor, he reminds the class to "dream a better dream, and work to make it real."
- Taylor Lautner as Sharkboy. Dreamt up by Max, Sharkboy is a young warrior who was raised by sharks after he was separated from his father, a marine biologist, when a waterspout sunk their floating laboratory. He has many shark-like adaptations to his body, including gills, fins, sharpened teeth, claws (although they seem to only be attached to his gloves), peak strength, highly trained sense of hearing, strong sense of smell, agility, reflexes and swimming ability. Sharkboy can also communicate with marine life and is not affected by deep sea pressure or The Bends. He is also known for imitating the sharks in his personality. "He's very self-confident and sometimes his confidence gets him into trouble', says Lautner about the character. "He's also kinda jealous of the character, Max, because he has an inside crush on Lava Girl and she's overly motherly to Max." Sharkboy also has an explosive temper which is shown several times in the movie, including a scene in which the Lalas are singing and Sharkboy complains about how his highly trained ears finding their high pitched singing uncomfortable and then becoming very angry and going into a shark frenzy. His weakness is electric eels. 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. Lautner was the first to audition for the film, says Rodriguez, and was chosen immediately.
- Taylor Dooley as Lavagirl. She is the other young warrior who protects Planet Drool, and was also created by Max. She can change herself into lava, and control lava in her direct vicinity. Her origins are unknown; she is uncertain of her own identity and purpose throughout much of the film. She has an explosive temper like Sharkboy, but is better at controlling it than he is and rarely gets very angry. Her weakness is water. The role of Lavagirl was cast after the two other main characters (Sharkboy and Max) had already been cast. Her lava bike was Computer-generated, like many of the elements in the film; Dooley and Lautner described the on-set versions of the lava bike and Sharkboy's shark-themed jetski as "a green box with handles".
- Cayden Boyd as Max. An imaginative 10-year-old boy, known as the "day-dreamer" on Planet Drool. "At first he's dreaming all for himself; he wants Shark Boy and Lava Girl to take him away", says Boyd about the role. "I like that he's selfish in the beginning and he's not selfish in the end".
- George Lopez as Mr. Electricidad / Mr. Electric, Tobor, and Ice Guardian. Mr. Electricidad is Max's teacher and is sometimes intolerant of active imagination. When his Mr. Electric counterpart shows up he is horrified as he's not a bad guy and learns the power of imagination. His alter ego is Mr. Electric, an electrician who maintains the equilibrium of Planet Drool until he becomes corrupted by Minus. Mr. Electric is heard to have a sense of humor, manifest in puns related mostly to electricity. His challenge to Sharkboy is followed by a companionable "Watts up?". Later, Mr. Electric shouts "Charge!" as he emerges from the tornado, indicating both an electric surge of power and an advance into battle. Immediately before his destruction, he threatens the class with "Megahertz", suggesting "mega hurts". Rodriguez wrote the part with Lopez in mind. This is a reference to his television series in which he also has a son named Max.
- Tobor and the Ice Guardian (the Ice Princess' father) are voiced by George Lopez in the film. Tobor is a robot who appears in the Dream Graveyard on Planet Drool. Max had formerly tried to build Tobor in the real world, but had been discouraged by a careless remark of his father's. The name "Tobor" evidently is "robot" spelled backwards. The Ice Guardian has a very small role; he is a tall figure made apparently of animate ice and a protective father to the Ice Princess, much as Mr. Electricidad is to his own daughter Marissa. Rodriguez states that he kept asking Lopez to play additional characters. Lopez spent a total of two weeks working on the film.
- David Arquette and Kristin Davis play Max's parents. Max's father is an unemployed writer. They are on the brink of a divorce. They mean well for Max but are unable to settle his troubles. On Planet Drool, Max's parents appear as a couple of Cookie Giants who live happily in the Land of Milk and Cookies. Like Sharkboy and Max, they are used as sources for a running gag wherein one character eats a mouthful of some substance and then violently spits it out, spraying the audience's viewpoint. This joke, when the male Giant is its central character, serves as a device to reflect his alter-ego's dislike of his wife's burnt chocolate-chip cookies, which are implied to be the inspiration, in Max's mind, for the Giant's location. It also gives a reason to show his wife's empathy, which is lacking in Max's real world.
- Jacob Davich as Linus / Minus. The secondary antagonist. He is a bully at Max's school and steals his Dream Journal. With it, he enters Max's dreamworld and, using the name "Minus" (a nickname bestowed by Mr. Electricidad for Linus' habit of disliked conduct), alters it to his version. He is ultimately converted to Max's friendship when the true nature of his bullying is revealed. The dream he later creates for himself, as shown in a resolving scene, is a superhero named "Mr. Positive", possibly as a contrast with his creator's nickname of "Minus".
- Sasha Pieterse as Marissa Electricidad / Ice Princess. Marissa is the daughter of Mr. Electricidad, and at first the only student who befriends Max. On Planet Drool, she appears as the Ice Princess, keeper of the Crystal Heart, which is a necklace she wears which can freeze anything, including time. Because Max and his friends desire an increased opportunity wherein to defeat Mr. Electric, they request the Crystal Heart of her, to discover that only she and her alter-ego Marissa can use it. Marissa is often kept under very severe scrutiny by her father; possibly as a result, Max has imagined the Ice Princess as capable of speaking boldly to her father, correcting him when he suppresses her.
Robert Rodriguez has an uncredited role voicing a shark. As seen in the credits, two of Robert Rodriguez's children, Rebel and Racer, portray Sharkboy at age five and age seven respectively. Rico Torres plays Sharkboy's father. Marc Musso and Shane Graham play kids at Max's school.