Tony Stark (Robert Downey Jr.) develops Post-Traumatic Stress Disorder after the Chitauri invasion in New York City and becomes obsessed with creating more Iron Man armors, in order to be prepared for everything. Meanwhile, the American government decides to Lieutenant Colonel James Rhodes (Don Cheadle) into their private superhero and modify the War Machine armor to create the Iron Patriot.
Tony learns that his old flame, Dr. Maya Hansen (Rebecca Hall), has created the Extremis Virus, which "upgrades" the human body to superhuman levels, for A.I.M, a research center run by Aldrich Killian (Guy Pearce), who is a member of the 10 Rings, a terrorist organization led by The Mandarin (Ben Kingsley), who wants revenge against Stark. Killian provides The Mandarin with Extremis, and begins to use A.I.M to create an army of Extremis-enhanced soldiers for the 10 Rings.
Tony goes to China and is injected with Extremis by Dr. Wu (Wang Xueqi). However, Dr. Wu is working for The Mandarin, and sabotages the procedure. Returning to Los Angeles, Tony creates the Mark XLII, which has self-operating parts that he can assemble and operate through remote control with the Extremis.
The Mandarin announces on TV that he will bomb the Grauman Chinese Theater, where Tony's friend Harold "Happy" Hogan (Jon Favreau) is located. Tony is too late to save Happy, who eventually dies. Tony then calls out The Mandarin on TV. He then creates the Mark XLV: The Hypervelocity Autonomous Personal Protector γ (H.A.P.P.γ), which is programmed with Happy's neural patterns.
The President of the United States of America (William Sadler) initiates a manhunt on The Mandarin through the Middle East after the destruction of the Grauman Chinese Theater. Believing that the President might be in danger, the Iron Patriot is assigned to protect Air Force One during its return to Washington, D.C. However, the armor is stolen by Jack Taggert (Ashley Hamilton), one of The Mandarin's men, while another terrorist, Eric Savin (James Badge Dale), infiltrates the President's Secret Service detail.
Maya becomes suspicious of Killian and visits Tony at his Malibu penthouse, where she meets Pepper. The penthouse is attacked by The Mandarin's forces, but Tony manages to rescue Pepper and Maya.
Taggert and Savin sabotage the Air Force One and kill the President. Tony realizes it's not Rhodes operating the Iron Patriot and catches up to the plane, rescuing several people before it crashes. After leaving them in safety, Tony attempts to return to L.A., but The Mandarin disables his armor through the malfunctioning Extremis and Tony crash-lands in Tennessee.
Tony eventually finds a barn and meets a boy, Harley Davis (Ty Simpkins), who helps him repair his damaged armor. Meanwhile, Vice-President Rodriguez (Marco Sanches), who replaces the President, is blackmailed by the 10 Rings into preventing S.H.I.E.L.D from intervening. Pepper is kidnapped by Killian and taken to A.I.M's secret laboratory in Louisiana, where his men are producing Extremis soldiers. Taggert, Savin and Killian himself become Extremis soldiers, and Killian also injects Pepper with the serum.
Maya tells Rhodes about Pepper's disappearance, and Rhodes begins to investigate the connection between the events.
Tony manages to salvage a gauntlet and a boot from his armor and meets Bethany Cabe (Stephanie Szostak), who helps him reach Maya. She repairs the Extremis in his organism. Tony uses spare parts from his armors to create the "Heartbreaker" armor and attacks the A.I.M base of operations, rescuing Pepper and Rhodes. The Heartbreaker is destroyed in the process, when Killian activates the Extremis soldiers.
Tony uses Extremis to telephatically control his army of armors -- The "Iron Legion" -- and create a modified second "Heartbreaker" armor. Rhodes uses a modified War Machine armor that Tony had created, and Pepper briefly uses the Mark XLII-R -- The Rapid Evacuation Situation Control Unilateral Enforcer (R.E.S.C.U.E). The Iron Legion fights the Extremis Soldiers, With H.A.P.P.γ sacrificing himself to save Tony. Maya eventually disables all Extremis-enhanced technology, allowing Savin, Taggert and Killian are defeated, but also incapacitating the Iron Legion. Tony then begins to search for The Mandarin.
Tony finds out that The Mandarin is not in the Middle East as they believe, but in Villa Vicayza in Miami. Unable to rely on the Extremis-enhanced suits, Tony operates a modified version of the Mark I to attack The Mandarin's villa and confront him. Tony confronts him without his armor, and defeats him. The Mandarin is then arrested by the American government, and the 10 Rings are disbanded.
Tony reunites with Pepper, Rhodes and Maya. Rhodes decides to return to being War Machine and Maya decides to continue her experiments on her own. Tony then uses the only remaining Extremis technology to create the Mark L -- The Extremis Armor -- which provides him with many abilities.
Later, at his workshop, Tony is informed by J.A.R.V.I.S (Paul Bettany) of a coded S.O.S that he intercepted while monitoring strange occurances in Space, antecipating another Chitauri invasion. The S.O.S was sent by Peter Quill (Chris Pratt), whose spaceship is under attack.
Surprised to find a human in Space and fearing that something might be coming to Earth, Tony assembles the Mark XLVIII -- The "Starbooster" Deep Space Armor -- which is made of Vibranium. Tony then leaves to investigate, reassuring J.A.R.V.I.S that he'll come back.