The owner of defense contractor Stark Industries, billionaire playboy and mechanical prodigy Tony Stark is in Afghanistan demonstrating the latest weapons of his company to the U.S. military. While travelling through the desert, the convoy Tony is in is attacked by a group of terrorists known as the Ten Rings, with Tony getting wounded by shrapnel from one of his company's weapons in the attack before being captured. He is taken to the underground base of the Ten Rings, where he discovers the terrorists have a stockpile of his company's weapons. A fellow captive, Yinsen, puts together an electromagnet powered by a car battery to prevent the shrapnel inside Tony from reaching his heart and killing him. The terrorists then try to force Tony to build missiles for them.
Tony replaces the battery with a miniature version of the arc reactor, the device that powers his company's headquarters back in America, and works with Yinsen to build a robotic suit of armor - the Mark 1 - powered by the arc reactor in order to escape. When it comes time for the pair to make their getaway, Yinsen sacrifices himself to stall the terrorists and buy time for the suit to power up. Once it does, Tony is able to fight his way through the base using the suit's flamethrowers, killing many of the terrorists in the process, and wounding Raza, their leader. He comes across the dying Yinsen, who tells Tony not to waste his life before passing on. Tony destroys the terrorists' weapons and escapes the base using jets built into the suit's legs, later crash-landing in the desert and destroying the suit, after which he is found by Lieutenant Colonel James Rhodes, his friend and military liason.
Returning to America, Tony is reunited with his longtime personal assistant Pepper Potts, as well as his company manager and former partner of his father Obadiah Stane, and his highly sophisticated and intelligent AI system Jarvis. Now unable to ignore the consequences of his company's dealings thanks to his experiences in Afghanistan, Tony moves to end Stark Industries' involvement in the arms trade, a move that Obadiah fears will destroy the company and the legacy of Tony's father. Tony is not swayed however, and builds a more powerful version of the miniature arc reactor, keeping the details of it secret due to an uncertainty of who he can trust. Pepper helps switch out the two reactors, and keeps the original - now with the words "Proof Tony Stark has a heart" engraved on it - in a glass display case. Tony later learns from Obadiah that his board of directors, worried about how Tony's decisions will affect the company, are trying to force him out of it.
Along with the new reactor, Tony also builds an upgraded and sleeker version of his suit - the Mark 2 - this one capable of full controlled flight using miniature "repulsors" in the palms of its hands and the soles of its feet as stabilizers and propulsion, respectively. While taking the suit on its first test flight, Tony attempts to break the world altitude record set by the SR-71, but the suit freezes up in the upper atmosphere and plummets to the ground, nearly killing him. After returning to his home, Tony changes the suit's base material to a gold-titanium alloy used in satellites to prevent further icing issues, later deciding to have Jarvis "throw a little hot rod red in there" after seeing a render of it. As he does so, he sees a news programme covering an annual charity event held by his company, and after learning that he was not sent an invitation, decides to go along anyway while Jarvis assembles the suit.
Arriving at the party, Tony is met by Phil Coulson, an agent of the Strategic Homeland Intervention, Enforcement and Logistics Division. Phil tries to question him about the events in Afghanistan, only for Tony to brush him off. Tony then takes Pepper - for whom he harbors a crush - out onto the dancefloor, but she is less than enthusiastic due to Tony being her boss, and his reputation as a womanizer. He goes to get drinks, whereupon he is confronted by Christine Everheart, a female reporter he had slept with before leaving for Afghanistan, who reveals that Stark Enterprises has been selling weapons to the Ten Rings since Tony's return. Tony questions Obadiah about this, only to discover that Obadiah has been behind the board's efforts to oust him from the company, with the further implication that he was responsible for both Tony's kidnapping and the current weapons trafficking.
A betrayed and furious Tony returns home, and his mood isn't helped when he sees a news programme detailing atrocities being carried out by the Ten Rings in Yinsen's homeland. In his fury, Tony accidentally discovers that his suit's hand repulsors double as blasters, and he dons the now completed suit - The Mark 3 - and uses it to fly to Afghanistan. Upon arriving, he wipes out a group of Ten Rings who were in the middle of attacking a village, and goes on to start destroying their weapons in the area. His actions gain the attention of Rhodes and the U.S. military, who mistake Tony for a UAV and send two F-22's after him, Rhodes at first unaware that they're attacking his friend. Attempting to evade the jets, Tony accidentally destroys one, and saves the pilot when his parachute malfunctions before escaping from the area. He returns home, whereupon Pepper walks in on him having his now gunshot-riddled suit removed, thus discovering his secret.
While these events are happening, Obadiah travels to Afghanistan to meet with Raza and the Ten Rings, who have recovered the remains of Tony's original suit. It is revealed that Obadiah was responsible for the attack on Tony's convoy, having hired the Ten Rings to kill his boss, only for the Ten Rings to renege on the deal when they realized who exactly their target was. Raza gives the suit's remains to Obadiah in the hope that Obadiah will manufacture suits for the Ten Rings, but Obadiah betrays him and has the Ten Rings killed by mercenaries. Obadiah returns home and reverse-engineers his own suit of power armor from the remains, but he and his experts, lacking Tony's mechanical aptitude and genius, are unable to duplicate the miniature arc reactor.
After explaining things to Pepper, Tony asks her to hack into the Stark Industries database to investigate the arms trafficking being carried out by his company. Pepper initially refuses and tries to resign, not wanting to help Tony risk his life, but she relents when Tony calls her out for leaving him when he's trying to do the right thing, after she had faithfully supported him when he was making weapons. She travels to Obadiah's office and discovers his dirty dealings while narrowly avoiding getting caught out by Obadiah, and passes the information on to Coulson and his organization. Obadiah discovers what she's done however, and incapacitates Tony with a paralyzing device, allowing him to steal the miniature arc reactor keeping Tony alive. After revealing his plans and taunting Tony with his intentions to kill Pepper, Obadiah leaves Tony to die. Tony survives by reinstalling his original arc reactor, whereupon he is met by Rhodes, who reveals that Pepper, Coulson and the latter's agents are moving to arrest Obadiah. Knowing that this will not be enough, Tony redons his suit and flies off to stop Obadiah. Rhodes looks at the nearby Mark 2 suit and considers following Tony, but decides "Next time, baby".
Pepper, Coulson and the agents try to arrest Obadiah, but he gets into his own suit and effortlessly overpowers them and nearly kills Pepper. He is stopped by Tony, and the two of them battle, but Tony is soon at a disadvantage since his old arc reactor was not designed for the Mark 3. He flies up into the sky, with Obadiah pursuing him and managing to grab him, only for his suit to freeze up and shut down; Obadiah had never gotten round to solving the icing problem. Both of them crash down on the roof of Stark Industries headquarters, Tony barely having any power left, but Obadiah survives and continues trying to kill Tony. With no other option, Tony has Pepper overload the arc reactor for the headquarters, blasting the roof with enough energy to kill Obadiah. Tony is also caught up in the blast to a lesser degree, but he manages to survive.
The next morning, with news of the battle public knowledge and Tony being referred to as "Iron Man", Tony holds a press conference to explain things. He is given a cover story and advised to claim that Iron Man is his bodyguard by Coulson - whose organization is now calling itself S.H.I.E.L.D. - but he disregards it and announces to the media that he is Iron Man.
In The Stinger, Tony returns home one evening to find himself face to face with a bald, African-American man with an eyepatch. This man tells Tony that he is not the world's only "superhero", and that though he doesn't know it yet, he's just become part of a bigger universe. Tony asks the man who he is, and the man introduces himself as Nick Fury, the director of S.H.I.E.L.D., before offering to discuss something called the "Avenger Initiative"...