Tony Stark is not okay. Months after the Battle of New York, he suffers from severe anxiety and PTSD, unable to sleep without building new Iron Man suits. He's created dozens of them, each more specialized than the last, while his relationship with Pepper Potts grows strained. When a young boy asks him how he escaped the wormhole, Tony has a full panic attack.
Meanwhile, a terrorist calling himself the Mandarin broadcasts threatening messages across America, claiming responsibility for a series of bombings. But these aren't ordinary explosions—there's no bomb evidence at the scenes. The attacks have a personal connection to Tony when his former bodyguard Happy Hogan is critically injured investigating suspicious activity at Stark Industries.
Enraged, Tony publicly threatens the Mandarin and gives out his home address. The Mandarin responds by destroying Tony's Malibu mansion with helicopter gunships. Tony barely escapes in a prototype suit, but the world believes him dead. The damaged armor flies him to rural Tennessee, where he'd been investigating the first Mandarin bombing.
Stranded without resources, Tony investigates with the help of Harley, a clever local kid. He discovers that the "bombings" are actually people—former soldiers injected with Extremis, an experimental treatment that grants regenerative abilities and superhuman strength but causes some subjects to explosively overheat. The program is run by Aldrich Killian, a scientist Tony cruelly dismissed at a New Year's Eve party in 1999.
Tony infiltrates the Mandarin's compound and discovers a shocking truth: the Mandarin is an actor named Trevor Slattery, hired by Killian to play a terrorist boogeyman. Killian is the real mastermind, using the fake Mandarin to cover up Extremis failures as terrorist attacks. He's also kidnapped Pepper and injected her with Extremis, hoping to either gain her loyalty or use her against Tony.
Killian has the Vice President in his pocket and plans to assassinate the President, installing his puppet and controlling the War on Terror from both sides. He's also captured Rhodey, whose War Machine armor has been rebranded as the "Iron Patriot" for better PR.
Tony breaks free and remotely summons all of his suits—the "House Party Protocol." Dozens of Iron Man armors descend on the oil tanker where Killian is holding the President. Tony, Rhodey, and the automated suits battle an army of Extremis soldiers in a spectacular fight. Tony jumps between suits as each is destroyed, improvising constantly.
In the final confrontation, Pepper—her Extremis powers now active—saves Tony and kills Killian herself. With the threat ended, Tony makes a choice: he orders J.A.R.V.I.S. to destroy all of his suits in a massive fireworks display, symbolically letting go of his obsession. He also undergoes surgery to finally remove the shrapnel near his heart, no longer needing the arc reactor in his chest.
"My armor was never a distraction or a hobby," Tony reflects. "It was a cocoon. And now I'm a changed man. You can take away my house, all my tricks and toys. One thing you can't take away? I am Iron Man."
In a post-credits scene, it's revealed that Tony has been recounting this entire story to Bruce Banner, who fell asleep almost immediately. Bruce apologizes—he's not that kind of doctor.