The movie opens several months after the events in the first Iron Man movie. We are introduced to a man named Ivan Vanko. Ivan's father Anton is slowly dying and telling Ivan his final wishes. Ivan thinks he should have the fame that Tony Stark is enjoying but Anton tells him to "ignore that garbage." All Anton can give Ivan is his knowledge. Ivan takes a blueprint that has his father's name on it, and also the name of Howard Stark, Tony Stark's father. Ivan then sets about recreating the Arc reactor and begins building his own weaponized suit. Tony Stark has become a champion for world peace thanks to the Iron Man suit, and has practically solved the issue of world peace, or so he claims.
Six months after the end of the first movie, Tony Stark has used his Iron Man armor to bring about a negotiated peace treaty between the major super powers of the world, and his immense popularity with the general public is only furthered when he fulfills his father's dream by reopening the "Stark Expo" in Queens, NY, to showcase all the latest inventions that will benefit the world. Tony fulfills this dream by flying into the expo in full Iron Man regalia, and making a flamboyant entrance to become the new symbol of world peace. Backstage, following his address, Tony does a quick test of his blood: the palladium he uses to power his chest arc reactor is slowly poisoning his body. After the event, Tony and Happy are leaving when they are approached by a woman who hands Tony a subpoena, summoning him to a Senate Armed Forces Committee hearing. Tony and Happy decide to take a road trip to Washington DC in Tony's new Audi R8.
The next morning, during the Senate hearing, Tony's usual brand of humor becomes the center of attention while completely ignoring the fact that the government has classified the Iron Man armor as a weapon. Colonel Rhodes presents the investigation into the events surrounding Iron Man's creation, but Senator Stern, the committee chairman, takes his remarks out of context. Tony gives a rebuttal showing that he is Iron Man and will not part with his armor (likening handing himself over as being tantamount to indentured servitude), and proceeds to hack the committees computers to show that various "attempts" at copying Tony's suit - from Iran, North Korea, and even Hammer Industries itself - are complete failures: North Korea's is top heavy and collapses easily, Iran's crashes into the ground and explodes, while Hammer's suit turns around 180 degrees at the torso and severs its pilot's spine. Tony still refuses to turn over the Iron Man armor to the government and walks out of the hearing.
Back at home, Tony is on JARVIS analyzing the latest prototypes and developments for the Iron Man suit, and Pepper enters and the two start having arguments about the future of Stark Industries. Tony is telling Pepper that he's making more money off the company's common stock than he ever did as CEO. He decides he's had enough of being the CEO and wants to focus solely on developing Iron Man. He decides to appoint Pepper as the new CEO and she is stunned. The next day a lovely notary public enters to have Tony officially sign the company over to Pepper. Tony is undergoing fighting training with Happy and performs an illegal move on him, getting it confused with MMA. The notary's name is Natalie Rushman, and he has Happy give her a boxing lesson, and while looking up her bio, Natalie performs a TKO on Happy, using a takedown that shows there's a great deal more to her than there appears.
Tony heads to Monaco for some much needed R&R. At a pre-reception before the Monaco 500, where Stark Industries is sponsoring a driver, Tony's greeted by his favorite "Vanity Fair" reporter Christine Everheart, who wants Pepper for the cover of the next issue which will introduce her as the new Stark Industries C.E.O. Justin Hammer also happens to be there. They also greet Tesla Motors CEO Elon Musk, who wants a panel at the Stark Expo to showcase his latest invention. In the bathroom, it's learned that the palladium in Tony's chest is slowly spreading, and his arc reactor can barely take the punishment. Tony decides that he's going to be driving the Stark Industries car instead of the driver that was pre-selected.
Stark starts the race, but unbeknownst to him, Ivan Vanko has joined one of the race's pit crews. Under his jump suit, Vanko wears a harness with two large energy whips powered by the arc reactor he'd built after his father died. Vanko uses the whips to stage a massive wreck and ambushes Tony. As Vanko is wrecking havoc on the track, Happy and Pepper rush to deliver the briefcase Happy carries with him to Tony. Vanko uses his electric whips to completely destroy the Rolls Royce Phantom that Happy and Pepper are in, and after repeated ramming attempts, Pepper finally manages to give Tony the briefcase. Tony activates the case which is a portable version of the Iron Man armor. After a furious battle, Tony is able to defeat Vanko by manually pulling out the Arc Reactor battery that powers his whips, crushing it after he has JARVIS analyze it. The police grab Vanko and take him into custody. The entire crowd is stunned at what they've just witnessed. Justin Hammer, however, believes that Vanko can be put to better use.
Stark confronts Vanko in prison and Vanko asks Tony what it feels like to be a dead man and that palladium in the chest is a very painful way to die. Stark tells Vanko that makes two of them.
Later, Hammer breaks Vanko out. He slips Vanko a meal consisting of chicken and mashed potatoes along with a note telling him to "enjoy the potatoes." Vanko and another prisoner are given uniforms with the same identification. Vanko immediately kills the prisoner as well as a guard on his way out the door, and sets the explosive device contained in the potatoes and as he makes his escape, he's bagged by two Hammer operatives and taken away. Hammer knows Vanko needs his resources to outdo Tony, and Vanko obliges. Hammer then hires Vanko to build armored suits based on existing designs. Vanko tells Hammer they are doing everything wrong.
On the plane back home, Tony and Pepper are watching the aftermath of the events that took place and are watching a rather angry Senator Stern unload his frustrations with Tony on The O'Reilly Factor. Stern is saying that Tony Stark lied to the Senate Armed Forces Committee, and that he's in danger of being arrested on felony perjury charges: Stark had told the Senate that other countries, as well as Hammer Industries, were 20 years away from having anything that remotely resembled Iron Man, however Vanko surprised everyone by making an working copy of the Arc Reactor. Tony presents Pepper with a gourmet meal and is going to tell her the truth, but they have an awkward moment as Pepper knows that something is up and that Tony isn't telling her the whole truth.
Back home, Tony is using JARVIS to conduct investigations into Ivan Vanko. He finds that Vanko's father Anton Vanko was Howard Stark's partner and one of the co founders of Stark Industries. Howard Stark found out that Vanko was conspiring to sell weapons to the Soviet Empire and had him arrested for treason and deported to Russia, where he was imprisoned. His son had been seeking revenge against the Stark empire ever since. While sitting in one of his hot rods in his basement, Tony nearly collapses and is discovered by Rhodes who tells him that this isn't a good look for him. He shows Rhodey how the palladium is slowly poisoning him. Rhodes also tells him that he's been battling with the Pentagon by stopping them from coming to his Malibu house and taking his suits to be used for weaponized purposes.
Tony is then preparing for what he believes will be his last birthday party. He asks Natalie what she would do if this were her last birthday party. Natalie responds that she'd do whatever she wanted with whoever she wanted to do it with. While at the party, Tony is extremely drunk and wearing the Iron Man suit and behaving recklessly with its weaponry. In the background, Pepper and Rhodes are discussing that he's gone way off the deep end. Rhodes tells Pepper that he's tired of dealing with the Pentagon and the Senate Armed Forces Committee. Rhodes, finally having enough of Tony's antics, goes and dons one of the in-development Iron Man suits. He then challenges Tony to a fight, where Tony has the in-house DJ play some good background tunes. The battle ends in a stalemate and Rhodey flies off in the Mark II armor, delivering it to military authorities at Edwards Air Force Base. Justin Hammer is later invited to study the suit himself and provides them with advanced weapons to arm it with.
The next day, Tony is at the famous Los Angeles landmark doughnut shop Randy's Doughnuts, sitting in the Iron Man suit atop the famous giant plastered doughnut. Disgraced and hungover, Tony is approached by SHIELD director Nick Fury, who tells Stark that despite the problems he's having with the government and his drunken Iron Man antics, which are the least of his worries; Fury has an issue to deal with in the Southwest United States. Tony wonders if Fury and the "Avengers Initiative" is real, and Fury reassures Tony that it's real, and that he knew Howard Stark very well, in fact Howard was one of the founding members of S.H.I.E.L.D., the agency he works for. They are joined by agent Phil Coulson and Natalie Rushman, whose real name is Natasha Romanoff, a S.H.I.E.L.D. agent planted in Stark Industries to monitor Tony himself. A hungover Tony is stunned at this revelation and fires Natalie/Natasha, but she then tells Tony that it's none of his business and that he's under investigation from S.H.I.E.L.D. , and she and agent Coulson are there to make sure Tony follows orders and doesn't screw up. Fury and Natasha both mention Tony's palladium poisoning; Tony replies that he's investigated and tested every know element and every permutation of them with no success. Natasha injects Tony with a serum that slows the symptoms of his palladium poisoning significantly, giving him the time to find an alternate element to keep him alive.
Fury tells Tony some more detail about Anton Vanko's relationship with Howard Stark and provides Tony with a chest of his father's old artifacts that can hopefully be used to find a cure for his condition. Tony resists further attempts from S.H.I.E.L.D. interference, but Agent Coulson reassures Tony that he's not going anywhere until Tony finds the answers that he's seeking about his condition. Reviewing the film reels in the chest, Stark discovers a message from his father that leads him to the original 1974 diorama of the Stark Expo. He retrieves the diorama from his old office, now occupied by Pepper, and tries to reconcile with her. In reality, the diorama is a disguised diagram for the atomic structure of a new element that Howard couldn't produce in his time but Tony may be able to with his advanced knowledge.
Stark performs a radical alteration of his home workshop and hand-builds a particle accelerator with the aid of his computer system, J.A.R.V.I.S. Stark synthesizes this new element, creating a new triangular chest arc reactor that cures his poisoning and is much more powerful than Stark's earlier versions. Just before Tony completes the particle acceleration, Coulson tells him that he's free to go and that S.H.I.E.L.D. has reassigned him to another case in New Mexico.
At Hammer Industries, Vanko has radically changed the design of Hammer's suits: they are now automated drones. Despite what Vanko considers improvements, Hammer is displeased and imprisons Vanko in a small room with two guards while he takes the drones to the Stark Expo.
Hammer unveils his new military drones, captained by Rhodes in a heavily-weaponized version of the confiscated Mark II armor. Unfortunately, it is soon discovered that Vanko has programmed the drones, giving himself complete control. He also has control of Rhodes' new armor, and Stark arrives just as they go on the attack. As Stark battles these remote-controlled enemies and tries to evade Rhodes, Happy Hogan and Romanoff race to Hammer's Queens facility to stop Vanko. By the time they arrive, Vanko has already departed for the Expo in a new armored suit, an updated version of the harness he used when he attacked Tony in Monaco. Back at the Stark Expo, just as Hammer has finished his presentation, the drones attack the standing-room-only crowd and they begin to flee. Stark and Rhodes chase after the drones and destroy each and every one of them, while Agent Romanoff and Pepper have Justin Hammer arrested for harboring the fugitive Vanko.
Natasha is able to give Rhodes control of his armor again so that he and Stark can fight Vanko together. The two armored allies combine their powers and successfully destroy all the drones. Vanko then lands in the area, wearing a greatly updated armored suit with improved plasma energy whips. After a grueling battle, Stark has an idea for he and Rhodes to use a trick from their earlier battle during Stark's birthday party, firing their energy repulsors to collide and create the same explosion with Vanko caught in the middle. The maneuver takes Vanko down, but Vanko's armor and drones are revealed to have been equipped with self-destruct charges. As they begin to explode, Stark races to save Pepper, rescuing her at the last moment. After landing on a roof she quits her CEO position, and she finally gives Tony a kiss, to which they both find Rhodes sitting a few meters away. Tony finally tells Pepper the truth about his heart, upsetting her greatly. Stark tells Rhodes to leave, but Rhodes then claims he was there first, so they should get their "own roof" after Stark tries to defend himself.
At a debriefing, Fury informs Stark that while Stark is "unsuitable" for the "Avengers Initiative," SHIELD wants Stark as a consultant. Stark agrees on the condition that Senator Stern personally present him and Col. Rhodes with their medals for bravery, however Senator Stern is less than amused when he presents Tony with his medal.
In a post-credits scene, SHIELD agent Coulson is seen driving to a remote impact crater in the New Mexico desert. He informs Fury over the phone that they've "found it"; in the crater is Mjolnir, the hammer of Thor.