Carmen Cortez and Juni Cortez [in which our heroes are hanging with (along with Bill and Ben, Ed, Edd, n Eddy)] have become agents of the OSS and face particularly hard competition with Gary and Gerti Giggles (Emily Osment and Matt O'Leary), the children of double-dealing agent Donnagon Giggles (Mike Judge), whom Carmen and Juni helped to rescue in the previous film.
After an incident at an amusement park, where the President's daughter (Taylor Momsen) deliberately sabotages a thrill ride which juggles its passengers, forcing the Giggles and the Cortez kids to compete in the rescue, Donnagon - who has somehow hacked into the teleprompter which the President was reading from - is named the director of the OSS; while Juni is fired after being framed by Gary - who was actually to blame - into losing the "Transmooker", a highly coveted device which can shut off all electronic devices. [However, unknown to Gary, Dusty witnessed what really happened] In his new position as director, Donnagon can carry on with his plan to steal the Transmooker, so he can rule the world. Throughout the film, Dusty tries to warn the team of Gary being evil but some of them don't listen to him.
After Carmen manages to hack into the database and reinstates Juni's level as an agent, she and Juni follow the trail to a mysterious island near Madagascar, which is home to Romero (Steve Buscemi), a lunatic scientist. Romero has been attempting to create genetically-miniaturized animals, so he can make a profit by selling the animals to kids. He had an experiment go wrong after accidentally pouring growth concoction onto the mutated set of animals. Later on, Dusty gets fed up with the team not listening to him and putting other things in front of their friendship and he flies off on his own to hunt Gary. [but the CMC follow him because they still owe him for saving their lives in Thomas and Twilight Sparkle's Adventures of Planes]. When Carmen is captured by a Spork, a breed of flying pigs, [some of our heroes pursue the Spork] she meets Gerti, who reveals to her that Gary is actually evil, some of the team feel remorseful and realize Dusty was telling the truth the whole time. Carmen changes her feelings for Gary and sides with Juni, who Gary is plotting against. After a number of action sequences, such as fighting skeletons and being captured by Sporks, the spy kids, along with the help of their family, Romero and Gerti Giggles, destroy the Transmooker and defeat Donnagon and Gary. Afterwards, Gregorio and Donnagon pathetically fight each other.
Donnagon is relieved by the President and Gary is fired, while Juni quits due to the impersonal treatment of agents by the OSS. The team apologize to Dusty for not listening to him. During the credits, Machete has Carmen sing as an undercover pop star in a concert. Carmen says she can't sing so Machete gives her a mic which auto-tunes her voice and a belt that helps her dance. He also gives Juni a guitar that plays itself. After the performance, Machete informs Carmen that he did not put the batteries in.
- Daring Do, Zecora, Stephen, Sharky, Mako, Willy, T.C., Hugs, Buzz, J.J., Socky, Skunky, 1206, The Miner Trains: (Steam Grindor, Steam Mech, Mucker, Steam Claw D., Steam Driller, Steam Sweeper, and Steam Exavator), Evan, Steamy, Puffy, Shai-Shay, Rattlesnake Jake, The Planet Trains: (Zip, Dazzlen, Dusten, Gustis, Rings, Uray, Tune, and Shiver), Dusty Crophopper, Bill and Ben, Blythe Baxter, Zoe Trent, Pepper Clark, Vinnie Terrio, Minka Mark, Sunil Nevla, Russell Ferguson, Penny Ling, Buttercream Sunday, Sugar Sprinkles, Gail Trent, Mitzi, Ed, Edd, n Eddy, Finn McMissile, Holley Shiftwell, and General Dedrich guest star in this film.