The movie opens with Tony narrating a story about how we create our own demons. In a flashback to New Year's Eve 1999, Tony, meets a botanical scientist named Maya Hansen in Bern, and arrogantly avoids crippled scientist Aldrich Killian, who wants Tony's backing in his endeavor, Advanced Idea Mechanics (AIM). Maya has an experimental plant. Maya has been working on experimental (and in some cases unethical) biological research in plants that causes their DNA to change drastically and has the power to cure incurable diseases.
Cut back to present day America at Tony Stark's beach side Malibu mansion. It's been quite some time after the events of New York City and the Avengers Initiative, a haunted Tony Stark has obsessively built several Iron Man suits in his mansion. Tony works on a new model, the Mark 42, which is modular; all the suit pieces fly to him and recombine. The first attempt at making the MK42 work is met with a funk version of "Here Comes Santa Claus" with Tony dancing while the pieces are coming at him. As per the course, Tony of course completely ignores any safety measures that JARVIS takes. It ends rather poorly when Tony is thrown across the room attempting flight with the MK42 and it shatters into pieces. JARVIS of course gloats with an "I told you so" moment.
Back at Stark Industries, Pepper meets Aldrich who demonstrates new DNA altering technology, Pepper refuses as it could be weaponized. Happy has found a new career as the head of security at Stark Industries although he's annoying nearly 99% of the company's personnel and visitors with his penchant for requiring everybody to wear badges, and Pepper explains that complaints against him have risen nearly 200% since he started working there. Tony then continues his story about creating demons. He then talks about how he turned on the TV to find a new terrorist at work called "The Mandarin". The Mandarin has hijacked American airwaves and makes his American debut by explaining about an attack that he carried out on an air force base in Afghanistan. The president's initial response to the Mandarin however makes him the butt of the jokes of late night talk show hosts. It seems the only thing that he's able to come up with is to take MK8, with James Rhodes, the one formerly known as "War Machine" which is then repainted, rebranded, and reintroduced as "The Iron Patriot".
Meanwhile Tony and Rhodes are dining at a Chilis'-esque restaurant. Tony asks Rhodes what's really going on with the Mandarin. Rhodes tells Tony that while the media and the press only know of about 3 attacks, there have been several more that have taken place off the books. Rhodes explains that he's now operating MK8 as the "Iron Patriot" (formerly known as War Machine). While the two are coming to an agreement that the name chosen was horrible, Tony is confronted by a group of kids who want his autograph. Tony jokes that the boy looks very much like the title character in the movie "A Christmas Story". The girl asks how Tony was able to escape the worm hole in New York, causing him to freak out. Tony makes a B-line for his Iron Man suit and enters, JARVIS explains that Tony is suffering a massive anxiety attack.
Pepper drives home and Tony has a huge stuffed toy for her as her Christmas gift. However, he is busy working and Pepper isn't greeted by Tony, but by another prototype of the Iron Man suit, and that has her rather upset. Tony has developed a heads-up-display (HUD) and was using it as a remote control. That night while asleep, Tony is having some bad PTSD induced trauma about what happened in New York. They're then startled when one of the new prototype Iron Man suits is awakened and has made its' way into the bedroom. Tony then immediately dismantles it. A frustrated Pepper tells Tony that she's going to sleep downstairs and has him "tinker with that" after he explains to Pepper that he's been a complete mess since the events in New York and has been unable to sleep.
The next day Happy is hanging out at the Chinese Theater. The Mandarin comes on TV and issues a new threat against the Chinese Theater, calling it a "cheap American knock off" just like the fortune cookie. Happy is suspicious and follows Aldrich and his henchman, Savin. In front of Grauman's Chinese Theatre, Savin gives another man a briefcase. Happy tries to intercede but is beaten by Savin, and the other man explodes, leaving only his old dog tags. The Mandarin comes on TV and takes responsibility for the blast. Tony is now furious over Happy, who suffered severe injuries to the attack. After going to the hospital to visit Happy, and to make sure that all of the hospital employees were wearing badges while in Happy's room (not to mention the TV must be on his favorite show - Downton Abbey), Tony is mobbed by reporters. One of them blatantly asks if Tony is going to kill this guy. A frustrated Tony then asks the reporters if that's what they really want, then issues his threat to the Mandarin saying that he just died and gives his home address on TV, egging on the Mandarin to carry out an attack on his home and that he'll be ready. Tony then angrily destroys the reporter's tape recorder and tells the mob of reporters to bill him.
While at home, Tony has JARVIS bring up a hologram diagram of the destruction at Graumann's Chinese Theater. While JARVIS is analyzing the attack, Tony discovers a curious oddity of military dog tags. Since there was no active military personnel at the blast, Tony wonders exactly what the dog tags are doing there. JARVIS then analyzes the latest Mandarin attack and compares with past incidents. The one that looks identical to the blast happened four years ago in Rose Hills, Tennessee, and predates any known Mandarin attack. Tony asks JARVIS if he's ever been to Tennessee. JARVIS then creates a flight path for the Iron Man suit. Then a doorbell rings. A paranoid Tony wonders why he's getting visitors since he told JARVIS that the house is on complete and total lock down. The visitor turns out not to be the Mandarin, but Maya Hansen, who tells Pepper that her boss might be working for the Mandarin. And her boss? None other than a mutual acquaintance of theirs - one Aldrich Killian. A freaked out Pepper is arguing with Maya and just as that's happening Maya points to the television where three helicopters are in formation outside the Stark mansion.
Helicopter gunships, led by Savin, attack with missiles. Tony commands the 42 suit to cover and protect Pepper. Pepper and Maya survive the attack. Tony gets the 42 back but down on power he cannot fly, the house crumbles into the sea taking the Ironman down. The suit regains some power and flies off, unseen. Tony then finds himself in rural Tennessee after JARVIS follows a flight plan from Tony's investigation into the Mandarin. On crash landing, JARVIS and the 42 suit run out of power. The world believes him dead.
Tony is now alone in the middle of Tennessee and is trudging through the snow, dragging the MK42 along with him. He seeks shelter in a nearby house which appears to be empty. There, Tony immediately begins work on repairing the MK42 so he can contact Pepper and tell her what's really going on. But the house isn't empty. It's occupied by a lonely 10 year old kid named Harley, who is stunned to find Iron Man himself working in his garage. Tony asks the kid for some help and that he'll be rewarded later on if he gets the help he needs. Harley tells Tony that the world thinks he's dead after the attack on his mansion. Tony calls himself "The Mechanic" and Harley asks Tony one question too many about the events in New York City, causing Tony to have another anxiety attack.
Back at the remains of Tony's now completely destroyed Malibu mansion, Pepper is searching for any clues to find out whether or not Tony's still alive. Thankfully she is able to retrieve a voice message left from Tony recorded after the attack that proves that he is alive. A relieved Pepper then seeks answers. Tony, working with Harley, assumes that Harley is being bullied at school because Harley keeps making harmless weapons to defend himself with, like a potato gun. Tony finally manages to get JARVIS back online thanks to a HUD display that he developed several months prior to the attack on his mansion.
Teaming with Harley, a precocious 10-year-old boy, Tony investigates the remains of a local explosion bearing the hallmarks of a Mandarin attack. According to JARVIS the explosion in Rose Hills, Tennessee has the look and feel of a Mandarin attack but predates anything that's known by the US military. Harley tells Tony all the rumors surrounding the attack and the "soldier" in question. He discovers the explosions were triggered by soldiers from the Extremis program, an experimental treatment intended to allow its users to recover from crippling injuries. However, if a user's body cannot properly metabolize Extremis, the user's body heats to an extreme temperature and explodes. After veterans started growing unstable and exploding, their deaths were used to cover up Extremis' flaws by manufacturing a terrorist plot. Tony witnesses Extremis firsthand when Mandarin agents Ellen Brandt and Eric Savin attack him. Tony blows up the woman and stuns Savin to escape.
In the aftermath of the attack on the town, Tony manages to escape into a news van, where he uses the satellite to contact Rhodes. Thankfully the van is being operated by one of Tony's biggest fans, who even goes so far as to have Iron Man's likeness tattooed on his arm - though rather unrecognizable. Tony manages to successfully contact Rhodes, where they have managed to locate what they think is the Mandarin. Rhodes takes War Machine (or Iron Patriot depending on which way you look at it) to the Middle East. There, they are shocked to find nothing but an abandoned warehouse which doesn't have a single trace of the Mandarin. The Mandarin comes back on TV and explains that he's going to brutally murder the CEO of a major oil company on live television if the president doesn't contact them within a specific time frame.
With Harley's help, Tony traces the Mandarin to a very posh estate in Miami. Stark infiltrates the estate headquarters using a variety of home-made weapons, Harley's trade mark potato gun, and a limited edition children's watch belonging to Harley's sister. Inside he discovers the Mandarin is actually a flighty British actor named Trevor Slattery, who is oblivious to the acts the Mandarin has carried out. When confronted, Slattery manages to tell both Tony and Rhodes that he's a method actor, and manages to completely annoy them both, and Tony goes to confront Killian, while Rhodes stays behind and tries to get any information he can out of the completely clueless Slattery. Tony is captured by some of Killian's henchmen - who are also Extremis experiments, and Maya reveals she was working with Killain all along. She thinks Tony can help perfect the Extremis DNA. Aldrich arrives and reveals he has kidnapped Pepper and subjected her to Extremis, intending to infuse her with superhuman abilities and turn her against Tony as leverage to gain Tony's aid in fixing Extremis' flaws. Aldrich then kills Maya.
Tony escapes his captivity by summoning the MK42 suit from Tennessee, and reunites with Rhodes on the estate, discovering that Aldrich intends to attack President Ellis aboard Air Force One. Unfortunately as time is critical, the MK42 has yet to regain full flight power. Savin boards the President's plane wearing the Iron Patriot suit, kills the Secret Service agents aboard and takes the President. Savin then blows holes in the airliner body and survivors fall out. Iron Man kills Savin and manages to rescue the falling people, Tony had been controlling the unit by remote control. Meanwhile the Iron Patriot flies away. Tony and Rhodes trace Aldrich to an impounded oil drilling platform where Aldrich intends to kill Ellis on live television. The Vice President will become a puppet leader, following Aldrich's orders in exchange for Extremis to cure a little girl's disability.
Rhodes manages to locate the President. He's in a massive ship yard at the Port Of Miami. Tony decides he's had enough of Killian and enacts a plan to take him down, and has JARVIS enact the "House Party Protocol" which unleashes a massive army of Iron Man suits - each one different from the next. On the platform, Tony goes to save Pepper, and Rhodes saves the President. Tony summons a fleet of his various Iron Man suits, controlled remotely by JARVIS, to provide air support and attack the many other Extremis infected guards. Rhodes secures the President and leads him to safety, while Tony discovers Pepper has survived the Extremis procedure. However, before he can save her, a container crane rig collapses around them and she falls 200 feet to her apparent death. Tony is forced into confronting Aldrich using several suits and finally traps him in the 42 suit that self-destructs. But, a glowing Aldrich survives and staggers toward a defenseless Stark. Killian tells Tony that the Mandarin was made up, that he is the Mandarin and that all attacks were taken out by Extremis experiments. Pepper shows up with Extremis powers and finishes off the weakened Aldrich.
After the battle, Tony orders JARVIS to implement "Clean Slate Protocol" which destroys each remaining Iron Man suit remotely, as a sign of his intention to devote more time to Pepper. The Vice President and Slattery are arrested. In a voiceover Tony mentions he cures Pepper, and Tony himself undergoes surgery to remove the shrapnel embedded near his heart. He pitches his obsolete chest arc reactor into the sea, musing he will always be Iron Man, even without his armor. He gathers some scrap parts from his house wreckage and drives off in his Audi eTron. He then leaves Harley with a rebuilt lab and new version of Harley's trademark potato gun, telling him that Iron Man will be back and leaves a thank you note from "The Mechanic".
In a post-credits scene, it is revealed that Stark has been recounting his experiences to Dr. Bruce Banner, who awakens, having fallen asleep at the beginning of Tony's story, followed by the words "Tony Stark will return".