The film opens in the 17th century, where an arms dealer named McCullen is being taken to a dungeon by French soldiers. The French soldiers accuse McCullen of selling arms to both sides of a war and conspiring to kill the French king. McCullen insults the French king and vows that even if he is killed, his descendants will carry on his work. The commander of the soldiers replies that they're not going to kill him; they instead take a burning iron mask and smelt it into McCullen's face to make an example of him.
The film then cuts to "The Not-So Distant Future".
James McCullen (Christopher Eccleston), the founder and president of the MARS weapons company, is presenting his newest weapon to NATO commanders. It is a nanotechnology missile which when fired on a target would release millions of little robots, which eat away at any material until they are deactivated. McCullen thanks NATO for funding his research and says the first four nano missiles will be delivered to NATO very soon. As the NATO commanders clap it up, General Hawk (Dennis Quaid) watches silently from a seat at the back of the auditorium.
Cut to a MARS base in Eurasia, and US Army soldiers led by Duke (Channing Tatum) and Ripcord (Marlon Wayans) are charged with protecting the missiles. While the convoy is driving, Ripcord tries to convince Duke that they should transfer to the Air Force, as Ripcord likes flying. Duke, however, says he wants to remain in the Army and be in the thick of the action. As they talk, Ripcord notices that the convoy passed a place where there should've been a security check without seeing any soldiers.
A futuristic hover-jet like aircraft then swoops in behind them, taking out the Apache helicopters in the convoy. The jeeps and the soldiers on the ground fire on the craft, but it is unaffected by their weapons. The craft fires pulse-like charges, which blow everyone up except for Duke and Ripcord, who take the briefcase with the nano missiles and run. Ripcords leg is injured, so Duke takes the case and brings him to safety. The enemy craft lands and lets out the Baroness (Sienna Miller) and several soldiers with black skull-masks. The masks take out the remaining US soldiers while the Baroness goes for the case. Duke and the Baroness struggle for the case, but then Duke gets a look at her face and says, "Anna?" This shocks the Baroness, who also recognizes Duke. Another futuristic jet comes along, this time with GI Joe soldiers Scarlett (Rachel Nichols), Snake Eyes (Ray Park), Breaker (Saïd Taghmaoui) and Heavy Duty (Adewale Akinnuoye-Agbaje). They take out most of the skulls, while Duke chases after Baroness. Baroness loses the briefcase with the missiles and jumps back into her jet and flies away empty-handed. The GI Joes surround Duke and Ripcord, saying they'll take the missiles now, but Duke refuses, saying that its his mission to deliver the missiles and he's going to finish it.
The Joes take Duke and Ripcord to a secret base in Egypt, where they meet up with General Hawk. Hawk then brings up a hologram of McCullen, who belittles Duke and demands to see that his missiles are safe. Even though Breaker says he's checked the nano missiles already, McCullen has them open the briefcase and checks it again. Seemingly satisfied, McCullen hangs up. Hawk tells Duke and Ripcord about the GI Joe program, which takes the best of the best soldiers and equips them with crazy gadgets and weapons to make them even better. Duke wants in with the GI Joes, but Hawk says they tried to recruit him four years ago but couldn't get through to him. Ripcord defends Duke, saying that he was going through a rough time back then.
Meanwhile, McCullen (a hologram version of him) is on a submarine going to a huge underwater secret MARS base. He blows up at Baroness for failing to get the nano missiles. Baroness says they should've just grabbed the cases in the Eurasia base, but McCullen says he had to make NATO take the blame, so she was the one who screwed up. McCullen's attraction to Baroness makes it all better, and their hologram forms flirt with each other until Baroness leaves. A hologram form of Storm Shadow (Lee Byung-Hun) then pops up, saying that if McCullen had chosen him for the mission instead of Baroness, they would have succeeded. McCullen replies that he is tasking Shadow to go with the Baroness to assault the GI Joe base and grab the nano missiles. Zartan (Arnold Vosloo), the only MARS member physically on the submarine, asks McCullen how they're going to find the missiles, and McCullen says that he reactivated a homing device in the briefcase when he was holograming into the GI Joe base. As the sub reaches the MARS compound, Zartan whistles the tune "He's a Jolly Good Fellow" to himself. Inside the compound, McCullen is greeted by The Doctor (Joseph Gordon-Levitt), who says the nanotechnology experiment on human beings is complete. He shows off 19 of his 20 new "Viper" soldiers, saying the 20th one has already been deployed into Washington DC. The nanotechnology injected in humans makes them obedient robots, impervious to pain and able to repair moderate wounds, which The Doctor shows by letting a cobra bite one of the subjects. The nanos inside the subject push the cobra poison out of the wound, and McCullen calls the Doctor a genius. The Doctor then asks McCullen if they could sell a nano-missile on the black market to generate more research money, but McCullen says there’s plenty of money, and once his grand plan goes ahead, the Doctor will have all the money he wants to research with.
Back at the base, Duke has a flashback about Anna/Baroness. Anna was once in the military with Duke, and they were in love. Duke proposes to her one day before going out on a mission, and she says yes. Duke snaps out of it when Hawk mentions that they’re scanning Baroness's photo on a worldwide database, but came up with nothing. Duke and Ripcord are due to be sent back to their base, as Hawk rejects their demand to enter the GI Joe program. Duke then says he knows who Baroness is, and will tell them everything about her. Hawk decides to listen to them and does not send them away yet.
The Baroness is then seen in her civilian life, where she is married to a French researcher guy. Storm Shadow appears at her house and tells her that they are hitting the GI Joe base the next day. He also informs her that McCullen had ordered him to kill her husband if he touches her again. Baroness replies that its normal to get touched by your husband, but doesn't seem to really care.
Outside the GI Joe base, Baroness, Storm Shadow and Zartan and a group of Vipers use drill machines to infiltrate the GI Joe base. Storm Shadow kills all the guards they encounter, and Zartan (a master of disguise), dresses up as one of the dead guards and goes looking for the missiles. He runs into Cover Girl (Karolína Kurková) talking to Hawk about signing some papers and such. Zartan goes up from behind her and stabs Cover Girl straight through with a knife, then Strom Shadow jumps in and slashes Hawk with a katana. Storm looks at the dead Cover Girl while Zartan jokes that Storm will not hurt a woman, but he (Zartan) doesn't mind. The MARS agents use Hawks ID to open a safe in his office and grab the nano missiles. As they leave, Hawk hits the security alarm, summoning up the other GI Joes. The Vipers use their pulse-guns to wreck most of the nameless GI Joes, while Snake Eyes and Storm Shadow (two ninjas from the same school) fight each other. While the others are occupied with the Vipers, Baroness and Scarlett also duel, and that ends with Baroness giving Scarlet a beating with her fists. As Baroness runs away with the missiles, Duke sticks her up with a handgun, but Baroness correctly guesses that Duke will not shoot her, daring him to kill her, since, in her words, "you've already done it once." Duke is then knocked away by a pulse blast, while Storm Shadow straps on a hoverpack and flies the Baroness and the nano missiles out of the base and into a waiting MARS plane outside. Zartan, who disappeared after they got the missiles out of the office, is seen outside the base disguised as a camel herder, while the real herder lies dead in the sand. He whistles his song and walks away.
The team, now shorthanded, finds out that Breaker had put his own trackers on the missiles. In Hawks absence, they decide to take Duke and Ripcord in for now, and try to intercept the missiles.
Meanwhile, the President of the United States is informed that the missiles were stolen. He reasons that to break into the GI Joe base, whoever did it was no ordinary group of terrorists.
Scarlet looks at herself in a mirror and is sad after the beating that Baroness gave her. Ripcord comes up to her, makes some jokes and says everything will be fine. She responds by smiling once Ripcord is gone.
Baroness reports back to McCullen, who tells her to go with Storm Shadow to Paris and set off one of the nano missiles to test it. McCullen says it will be revenge for what the French did to his ancestors. The mask used on his ancestor at the start of the movie is now sitting in McMullen’s office as a decoration.
Duke has a flashback about his falling-out with Anna/Baroness. Anna's brother Rex was a biology specialist in the US Army and went on a mission with Duke in Africa 4 years ago. The unit comes under heavy fire at their target building, and Rex was sent into the building to do his mission while Duke and Ripcord covered him on the outside. Duke had told Rex that there would be an air strike on the compound in 5 minutes, but the air strike comes in way too early, blowing up Rex, the building and all the enemies while Duke and Ripcord get thrown aside. Anna breaks down at Rex's funeral, and Duke, despite being scarred in the face by the air strike, is too guilty to face Anna and runs away, leaving his engagement to Anna broken.
McCullen visits the Doctor in the underwater base, where Zartan is strapped up to a nano machine. The Doctor says that the nano robots would take Zartan's disguising techniques to a whole new level, and Zartan agrees to be injected with the nanos. The Doctor complies, but before the procedure starts, Zartan breaks the memory card, which would allow anyone to control his brain. The rest of the nanos are injected into Zartan, making his face go through a variety of shapes while causing him a lot of pain.
The Baroness and Storm Shadow arrive in Paris and go to her husband’s research lab. While there, Storm Shadow kills all the guards, and Baroness demands that her husband use his civilian power generator to activate and weaponize the nano missiles. He does so, and Baroness kisses him when it’s done. Storm Shadow then kills the husband while Baroness remains indifferent.
The GI Joe team follows the missiles to Paris. Duke and Ripcord are given armor suits that will make them super fast and durable, and the team catches the MARS agents as they are leaving the civilian lab. A huge shoot-out/car chase throughout Paris ensues, with the MARS men using a tricked-out black Hummer with weapons all over it to throw off the chasing GI Joes. They manage to shake Snake Eyes and Scarlet, but ram into a train and flip the Hummer. Baroness and Storm Shadow survive and split up on foot, with Shadow carrying a nano missile in an RPG launcher and Baroness holding the kill switch to the nano robots. Duke and Ripcord, who kept up with the MARS people with their suits, split up as well with Ripcord going after Shadow and Duke going after Baroness. Baroness calls for a plane pickup and holds off Duke with her pulse gun, while Ripcord does not stop Storm Shadow from firing his missile into the Eiffel Tower. Shadow and Baroness jump into a MARS plane once they’re done, but Duke jumps in after them and hits the kill switch on Baroness' belt, thereby stopping the nano robots from destroying the city. It doesn't save the tower though, as the tower is too damaged and falls over, crushing lots of stuff. Storm Shadow then knocks Duke out and captures him.
While they fly away, Storm Shadow has a flashback of his own, as he remembers the first time he met Snake Eyes; Snake Eyes was a white orphan who is for some reason in Tokyo. He breaks into a temple to steal food but is confronted by Storm Shadow, and the 7 year-olds fight in the kitchen. Storm Shadows master stops them and decides to take Snake Eyes in, despite Storm Shadow's objections.
Duke wakes up in the North Pole, where the MARS underwater base is located under the ice. Baroness says that he is not dead yet because McCullen has got plans for him. As they walk into an icecap which will take them underwater, Duke grabs the case with the remaining missiles and tries to run. Storm Shadow throws a ninja star into his shoulder, however, and the guards catch him and beat him up. While this is happening, Baroness suddenly starts having brief yet vivid flashbacks about all the happy times she had with Duke. Storm Shadow comments that they are thousands of miles away from anything else, and Dukes poorly thought out plan to run with the missiles is what makes him a typical meathead soldier.
The GI Joe team, meanwhile, are informed by a recovering Hawk that they have been banned from France after the destruction they caused. The team wants to go rescue Duke but have no idea where he is. However, Breaker suddenly gets a signal from the missile briefcase, indicating that Duke had grabbed the briefcase not to run away with it, but just to have it long enough to turn Breaker's tracker back on again. Using the signal and some CSI-like science deduction, the team reason that the MARS base is in the North Pole and set out there.
Duke is brought to McCullen, who intends for Duke to be injected with nano robots and to become the ultimate Viper soldier. McCullen tells Duke the 3 remaining nano missiles will be fired into Moscow, Washington DC, and Beijing, with the hope that the world will then realize that no nation can stop MARS and will then submit to the power of his weapons. McCullen then french kisses Baroness in front of Duke, prompting Duke to head butt him when McCullen gets up close to Duke to taunt him. Baroness has more flashbacks about her and Duke frolicking through sun-lit fields (I did not make that up, that is literally what the flashback is of). Duke is then taken to the Doctor to be injected.
The GI Joes decide to assault the MARS base with a submarine attack from the sea, while Scarlet, Ripcord, Breaker and Snake Eyes go in from the ice above. While the 4 Joes are still up on the ice, the three missiles launch, but Ripcord uses a missile to take out the one intended for Beijing. He then jumps into a supersonic prototype jet, which belongs to McCullen and chases after the other two missiles. Before he goes, Scarlet quickly kisses him on the lips and wishes him good luck.
Duke is about to be injected with nano robots, but The Doctor wants to talk some more before he does it. Duke asks why is he doing all this, then the Doctor takes off his mask and reveals himself to be Anna's brother Rex, shocking Duke. In a flashback, we see that Rex ran into the building in Africa and found a single researcher inside who was working for MARS with nanotechnology. Rex was fascinated by the content, but still tried to go on with the mission. However, the air strike hits, but since the building is actually a MARS bunker, him and the researcher survive, albeit with disfiguring injuries. Instead of returning, Rex then chooses to stay with MARS and take nano-weaponry to the next level. It is also revealed that he had Anna kidnapped and injected with nanos as well, thus turning her into the Baroness. Duke tells him that his weapons have killed and will kill many people, but Rex/Doctor says that sacrifices must be made in the name of science. Doctor then puts his mask back on, but Baroness then runs in and decks him. She tries to release Duke, but Doctor then triggers the nano robots inside her, paralyzing her. He threatens to kill her if Duke does anything. McCullen then comes in and the Doctor tells him that Anna had somehow overcome the mental control of the nano, the first person to do so.
Meanwhile, Breaker and Scarlet go into the missile lab and try to talk Ripcord through how to destroy the missiles. Snake Eyes engages in another duel with Storm Shadow. In a flashback, we see that as children, Snake Eyes blossomed in training at the temple and eventually became the top student. Blinded by jealousy, Strom Shadow killed their teacher and ran away. Since that day, Snake Eyes had made himself mute. Him and Storm Shadow duel to the death inside the base, and Snake Eyes eventually kills Storm Shadow. As Storm Shadow's body falls down from a platform, Snake Eyes holds his head and breathes really heavily.
In Washington, the President has been informed of a missile flying towards DC and is evacuated into a secret bunker. As the doors close, the MARS logo is clearly seen on the bunker.
Ripcord flies his plane first towards the missile heading for Moscow, and with some help from Scarlet, learns to use the weapons on the plane and blows up the missile. He then jets over super fast to the DC one, but misses his first shot at it, forcing him to fly really close to the missile and hit it from point-blank. The missile is killed, but all the nanos fly off the missile and onto his plane, forcing him to fly up while the nanos eat away the plane. Ripcord ejects just in time and parachutes down in front of the White House.
As the other Joes attack the base, an explosion gives Duke an opening, and he knocks the nano-controller away from The Doctor. McCullen picks up a flamethrower and tries to burn Duke, but messes up and ends up burning himself instead. Doctor grabs McCullen and runs away into a submarine. Duke and Anna, now completely free of the nano mind-control, chase after them in another submarine.
In the bunker, the president of the United State is told that the missile was destroyed and everything is OK. However, one of his guards then shoots all the other guards. This guard turns out to be the 20th Viper soldier, which the Doctor was talking about earlier. A secret door opens, and someone walks in and greets the President. The President screams.
Back underwater; the Joes all evacuate the base after The Doctor hits the self-destruct button. The Doctor then injects a severely burned McCullen with something, which makes his face turn metallic, much like his ancestor's mask. The Doctor then tells McCullen that McCullen's new name will be "Destro", and that he shall refer to the Doctor as "Commander". However, Duke and all the other Joes surround Doctor's submarine, and Destro and The Doctor are captured and put in some high-tech prison capsule.
Then movie then cuts to an aircraft carrier, where doctors are telling Duke that they don't know how to get the nanos out of Anna, but they'll figure it out in time. Anna, who is currently in military prison, says that she will most likely be jailed for all the things she did, but Duke responds that none of it was her fault, and that this time he will be there for her always.
The team of Joes and Hawk get back to their base, where Hawk finally invites Ripcord and Duke to be official members of GI Joe. Both of them accept.
In the final scene of the film, the "President" of the US is congratulating all his staff in the White House about avoiding the crisis. He walks into the Oval Office alone, puts his feet on the desk while looking around, and starts to whistle "He's a Jolly Good Fellow"...
You can send in your spoiler to other movies by going here.