Six months after revealing his identity as Iron Man, Stark Industries CEO Tony Stark (Robert Downey Jr.), has helped maintain world peace. He re-institutes the Stark Expo in Flushing Meadows, New York, to continue his father's legacy. A Senate committee, led by Senator Stern (Garry Shandling), demands Stark release the technology for military application. Stark refuses, claiming his competitors are years away from successfully recreating the technology.
Stark is slowly being poisoned by the palladium core in his arc reactor, and all attempts to find a substitute element have failed. Growing increasingly despondent and thrill-seeking as a consequence of what he believes to be his impending death, and electing not to tell anyone about his condition, he appoints his former personal assistant Pepper Potts (Gwyneth Paltrow) CEO of Stark Industries, and fills Potts' former position with Natalie Rushman (Scarlett Johansson).
While participating in a race at the Circuit de Monaco, Stark is attacked by Ivan Vanko (Mickey Rourke), who has constructed an arc reactor and a suit of his own, along with whip-like energy weapons. Stark defeats Vanko with the aid of his portable briefcase armor. Afterward, Stark learns that Vanko is the son of his father's old partner, Anton Vanko, who collaborated with Howard on the first arc reactor but was deported to the Soviet Union following his attempts to cash in on the technology and died in poverty. Ivan blames the Starks for his family's fate, and seeks revenge. Rival weapons manufacturer Justin Hammer (Sam Rockwell) has Vanko broken out of jail - by way of faking Vanko's death - and recruits him to perfect a line of armored combat units to upstage Stark at his own Expo.
Stark throws what he believes will be his last birthday party and gets drunk while wearing the Iron Man armor and indulges in dangerous activities, forcing his friend, Lt. Colonel James Rhodes (Don Cheadle), to intervene. Rhodes dons Stark's Mark II armor and after almost destroying Stark's house in the resulting fight, delivers the armor to the military. The next day, Nick Fury (Samuel L. Jackson), director of S.H.I.E.L.D., approaches Stark, revealing Natalie as undercover agent Natasha Romanoff and that Howard Stark was a S.H.I.E.L.D. founder. Fury gives Stark some of Howard's old material after Natasha administers an injection that reduces the symptoms of palladium poisoning. A hidden message in the diorama of the 1974 Stark Expo proves to be a diagram of a new element's atomic structure. With the aid of his computer J.A.R.V.I.S. (voiced by Paul Bettany), S.H.I.E.L.D. Agent Phil Coulson and Captain America's shield, Stark synthesizes the new element. Then Stark is contacted by Vanko, who reveals he is still alive and set on revenge. Knowing that there is no time to lose, Stark inserts the new reactor without prior testing, removing his dependency on the palladium that was poisoning him.
At the Expo, Hammer unveils his new military drones, captained by Rhodes in a heavily weaponized version of the Mark II armor. Stark, in his new Mark VI Iron Man armor, arrives to warn Rhodes, but Vanko seizes control of both the drones and Rhodes' armor, setting them to attack Iron Man. Hammer is arrested while Stark's bodyguard Happy Hogan (Jon Favreau) and Romanoff race to Hammer's Queens facility. They find Vanko has already left, but Romanoff is able to turn over control of the Mark II armor to Rhodes.
Eliminating the remaining drones, Stark and Rhodes are confronted by Vanko in his new, more powerful suit of armor. He is defeated when Stark and Rhodes fire repulsor rays at each other, triggering an explosion beside Vanko. Too injured to continue the fight, Vanko's last words are "You lose..." and he ignites his drones' self-destruct mechanisms, apparently killing himself in the process. Stark races to save Pepper amid a series of explosions. Pepper quits her position as CEO, and she and Stark kiss. Rhodes departs with the Mark II armor without serious objection from Stark.
At a debriefing, while showing news footage of another superhuman event, Fury informs Stark that while Iron Man is a suitable candidate for the "Avengers Initiative", Stark himself is not. S.H.I.E.L.D. wants Stark in a consultant position, to which Stark agrees on the condition that Senator Stern present himself and Rhodes with their medals for bravery.
In a post-credits scene, S.H.I.E.L.D. Agent Coulson (Clark Gregg), sent by Fury to New Mexico, observes an impact crater in the desert, calls him and says, "We've found it." The final shot shows Thor's hammer lying at the crater's bottom. To tease the 2011 Marvel movie - Thor.