Tony Stark (Robert Downey Jr.) avoids his own Apogee Awards ceremony to gamble at a Las Vegas casino, leaving his deceased father's friend and business partner, Obadiah Stane (Jeff Bridges) to collect the award. As Stark leaves the casino with his entourage, he is approached by Vanity Fair reporter Christine Everhart (Leslie Bibb), whom he charms into a one-night stand at his Malibu house. As she awakens the next morning, she is escorted from the house by Pepper Potts (Gwyneth Paltrow), Stark's personal assistant, who tells her Stark is away on a business trip, though Stark is really still in the house, until Potts informs him how late he is. Stark flies off to Afghanistan for a successful demonstration of Stark Industries' new weapon, the "Jericho" cluster missile. On the way back, however, the military convoy is attacked. In the ensuing firefight, Stark is wounded by one of his own company's bombs, which knocks him unconscious and embeds shrapnel in his chest, one fragment dangerously close to his heart. Waking up hours later in an Afghan cave, Stark discovers an electromagnet embedded in his chest, powered by a car battery and designed to keep the shrapnel from piercing his heart and killing him.
Stark has been captured by the terrorist group known as the Ten Rings, who order him to build a Jericho missile for them. Instead, during the three months of his captivity, he and fellow captive Dr. Yinsen (Shaun Toub) begin building a miniature "arc reactor", a smaller version of a power source previously invented by Tony's father, Howard. With the reactor powering his electromagnet, Stark and Yinsen secretly build a crude but strong power armor as a means of escape. Unfortunately, the process of activating the armor takes more time than expected and Yinsen hurries out to buy time. Once the armor is ready, Stark charges through the caves. Near the exit, he comes across a dying Yinsen,who tells him not to waste his life. Forever grateful to Yinsen after he dies in front of him, Stark burns all the Stark Industries munitions the terrorists have accumulated and then attempts to fly away, only to crash into the desert a few miles away. After being rescued by his friend and company military liaison Lieutenant Colonel James Rhodes (Terrence Howard) and returned to the United States, Stark declares at a press conference that his company will no longer manufacture weapons. Stane tells him shortly thereafter that this move is being blocked by the members of the board of directors of Stark Industries.
Returning home, Stark retreats from the public eye and instead focuses on the design of his power suit, refining its size and improving its flight and fighting capability while making an improved arc reactor for his chest. During his work, Potts gives Stark his first miniature arc reactor as a gift encased in glass and bearing the inscription, "Proof that Tony Stark has a heart." During Stark's first public appearance since his return, at the Walt Disney Concert Hall, he spots Potts, who is wearing the dress she bought for herself as a birthday present on his behalf. He is struck by her beauty and briefly dances with her, causing him to realize that he has romantic feelings for his assistant. As they're about to share a kiss, Potts interrupts by asking for a martini, as a ploy to hide her insecurity because of Stark's promiscuity. While ordering the drinks, Stark is accosted by Everhart, who shows him pictures of Stark Industries weapons back in the hands of terrorist groups, including Jericho missiles. He realizes that Stane has been supplying both the Americans and their enemies, and that Stane has been attempting to remove Stark from power. Enraged, Stark dons the power suit, flies to Afghanistan and rescues Yinsen's village from the Ten Rings, also destroying the latest Stark weapon shipments in the process. During the operation, Stark inadvertently attracts the attention of the United States Air Force and Lt. Col. Rhodes, who dispatches two F-22 Raptors to intercept and eliminate the unknown target. During the dogfight, one of the planes is accidentally destroyed, but the pilot is rescued by Stark, who during the fight privately calls Rhodes to reveal that he is the unidentified object. Rhodes later classifies the incident as a training accident to the press, at Stark's recommendation.
Determined to atone for his mistakes, Stark sends Potts to find the shipping records of Stark Industries, so he can track the illicit shipments and destroy them. While hacking into the system, she discovers that Stane hired the Ten Rings to kill Stark and the group reneged on the deal upon discovering Stark was the true target. She also learns Stane has recovered the power suit prototype and reverse-engineered his own version, but his engineers are unable to duplicate the miniature arc reactor to power the new suit. Stane ambushes Stark in his house, using an experimental Stark Industries device to temporarily paralyze him. Stane removes the arc reactor from Stark's chest to power his own suit. The dying Stark manages to re-install his first reactor from Pepper's gift and Rhodes finds Stark in bad shape but alive. Although his first reactor was not designed to power his latest armor, Stark takes it to battle with Stane atop Stark Industries, the surrounding streets and up into the air. Finding himself outmatched by the Iron Monger's potential for brute force, Stark lures Stane atop the full-sized arc reactor at Stark Industries to end the battle. With no more power left for his suit, Stark instructs Potts to overload the arc reactor. Potts overloads the reactor, causing a massive electrical surge that knocks Stane unconscious, causing him to fall through the ceiling into the reactor itself, incinerating him.
In the next day, the press has dubbed Stark's alter ego "Iron Man." Rhodes informs a press conference that what happened at the company's site was a malfunctioning of a robotic prototype, and one of Stark's security personnel was the Iron Man who bravely donned a prototype exoskeleton he designed to stop it. Before speaking, Stark briefly makes an attempt to establish a romantic relationship with Potts, but is put on hold. During the press conference, Stark tries to tell the cover story given to him by his S.H.I.E.L.D. contact, but after inadvertently revealing hints about his alter-ego, as well as facing a trick question from Everhart, Stark abandons the alibi and announces to the press his identity as Iron Man.
In a post-credits scene, Stark is visited by S.H.I.E.L.D. Director Nick Fury (Samuel L. Jackson) who notes that Stark is not "the only superhero in the world", and states he wants to discuss the "Avenger Initiative".