Six months after revealing his identity as Iron Man, Stark Industries CEO Tony Stark (Robert Downey, Jr.) has helped maintain world peace. He opens the Stark Expo in Flushing, New York, to continue his father's legacy. A United States Senate committee, led by Senator Stern (Garry Shandling), demands Stark release the technology for military application. Stark refuses, publicly shaming rival Justin Hammer (Sam Rockwell) in demonstrating how competitors are at least five years away from successfully recreating the technology.
Stark has discovered the palladium in the arc reactor keeping him alive is slowly poisoning him. All attempts to find a substitute element have failed. Slowly going off the rails as a consequence of what he believes to be his impending death, he appoints his former personal assistant Pepper Potts (Gwyneth Paltrow) CEO of Stark Industries, replacing her with Natalie Rushman (Scarlett Johansson).
While participating in a race in Monaco, Stark is attacked by Ivan Vanko (Mickey Rourke), who has constructed a miniaturized arc reactor of his own, including whip-like attachments harnessing the electrical energy. Defeating Vanko with the aid of his briefcase armor, Stark discovers that Vanko is the son of his father's old business partner, disgraced Russian physicist Anton Vanko, who collaborated on the first arc reactor and has passed the technology on following his death. Ivan blames Tony and his family for his father's demise; Anton raised his son to believe Howard Stark betrayed him, having him deported back to the Soviet Union in order to receive all the credit for the arc reactor. Vanko is broken out of jail by Justin Hammer, who puts him to work fashioning a line of armored combat units that he will use to upstage Stark at his own Expo.
With the government leaning on him even harder following the revelation that arc reactor technology is in the hands of someone else, Stark throws what he believes will be his last birthday party and promptly proceeds to get drunk while wearing the Iron Man armor, becoming a danger to himself and others. His friend Lt. Colonel James Rhodes (Don Cheadle) is forced to take the Mark II armor and subdue Tony, delivering the armor to the military afterward. Disgraced, Stark is approached by Nick Fury, director of S.H.I.E.L.D (Samuel L. Jackson), who reveals Natalie is an undercover agent. He also provides Tony with a chest of his father's old artifacts, which can hopefully be used to find a cure for his palladium poisoning. Stark realizes his father has left him a hidden message in the original diorama of the 1974 Stark Expo; the model is also a diagram of the atomic structure of an unknown element, which Howard was unable to synthesize due to the limits of his era's technology. Tony builds a particle accelerator (held up partially by a halfway-constructed shield) in his home with the aid of his computer J.A.R.V.I.S. (voiced by Paul Bettany) and synthesizes this new element. The element is then loaded into a modified arc reactor chest piece and cures Stark's palladium poisoning. Afterward, Ivan calls Stark, revealing that he is free and set on revenge.
At the Expo, Hammer unveils his new military drones, captained by Rhodes in a heavily-weaponized version of the confiscated Mark II armor. Stark arrives as Iron Man intending to warn Rhodes, but Vanko takes control of both the drones and Rhodes's new armor, setting them to attack Iron Man. As Stark battles against these remote-controlled enemies, Potts has Hammer arrested while Stark's bodyguard Happy Hogan (Jon Favreau) and Natalie race to Hammer's Queens facility to stop Vanko. By the time they arrive, Vanko has already departed for the Expo in a new, more powerful suit of armor, but Natalie is able to give Rhodes control of his armor again so that he and Stark can fight together. After taking down the drones, the two fight Vanko in his new armor. They defeat him with a combined blast of their repulsor rays, but Vanko's armor and drones are then revealed to have been equipped with self-destruct charges. As they begin to go off, Stark races to save Pepper, rescuing her at the last minute. She quits her CEO position, claiming it to be too stressful for her, and she and Stark finally kiss. Rhodes departs with the Mark II armor, which he intends to keep.
At a debriefing, Fury informs Stark that while he is "unsuitable" for the "Avengers Initiative", S.H.I.E.L.D. wants him as a consultant and wants the Iron Man armor on the team with a more suitable person using it. Stark agrees on the condition that Senator Stern present him and Col. Rhodes with their medals for bravery.
In a post-credits scene, S.H.I.E.L.D. agent Coulson (Clark Gregg) informs Fury over the phone they've "found it", as an impact crater in the New Mexico desert is shown to contain Mjolnir, the hammer of Thor.