Peter Parker struggles to balance his crime-fighting duties as Spider-Man with the demands of his normal life. He loses his job, faces financial difficulties, and struggles to maintain his physics studies at Columbia University. Moreover, he has become estranged from both love interest Gwen Stacy, who to Peter's disappointment is in a relationship, and best friend Harry Osborn, who falsely accuses Spider-Man of murdering his father Norman Osborn. Peter additionally discovers his Aunt May is threatened with foreclosure. More than old friendship ties, a battle with a homicidal criminial, dubbed the Beetle, makes his brain pressure capacity a lot higher.
Harry, now head of Oscorp's research division, sponsors the brilliant nuclear scientist Otto Octavius, who, dreaming of perfecting sustained fusion power, wears a harness of powerful robotic tentacle arms with artificial intelligence while conducting his research. When a power spike causes an experiment to destabilize rapidly, Octavius stubbornly refuses to shut the experiment down, leading to disastrous consequences: his wife is killed, the neural inhibitor chip which keeps the arms from influencing his mind is destroyed and the arms are fused to his spine. Spider-Man arrives and shuts down the experiment before it can do any further damage.
At a hospital, doctors prepare to surgically remove Octavius' arms and harness, but the arms, having developed sentience from the inhibitor chip's destruction, spring to life and murder most of the medical crew. Upon regaining consciousness and seeing the carnage, Octavius escapes and hides at a harbor. The arms convince him to retry the experiment. To fund it, Octavius—now called Doctor Octopus by the Daily Bugle—robs a bank.
After Peter misses Gwen`s debut play show (her dream was to create a science talk show, so she got in plays with her good friend Mary Jane Watson to gain popularity), she, in retaliation, becomes engaged to astronaut John Jameson, son of Bugle chief J. Jonah Jameson. Peter is devastated, this in addition to all the other accumulating stress factors in his life become too much, causing him to lose his powers. He abandons his Spider-Man identity and returns to his normal life while trying to reconcile with Gwen.
A garbageman brings Spider-Man's costume to J. Jonah Jameson, who blames himself for Spider-Man's disappearance. Peter tells Aunt May that his Uncle Ben's death some time ago was partially his fault. May forgives him, but when his nine-year-old neighbor mentions Spider-Man's disappearance and the subsequent rising crime rate in New York City, Peter begins pondering if abandoning his Spider-Man identity was a wise choice. Octavius needs tritium to fuel his reactor and goes to Harry to demand it. Harry initially refuses because the experiment threatens to level the city, but he eventually agrees in exchange for Spider-Man and tells him that Peter, who is supposedly good friends with Spider-Man, is the key to finding him. However, Harry tells Octavius not to harm Peter. Octavius finds Peter, tells him to find Spider-Man, and abducts Gwen. Peter realizes his powers are restored due to the trauma of seeing Gwen kidnapped, and dons his costume again after stealing it from the Bugle.
As Spider-Man battles Octavius, they fall onto a rapid transit R train. Octavius disables the controls and jumps off. Spider-Man stops the train before the track ends. When he faints from exhaustion, the passengers carry him into one of the cars. He comes to and realizes his mask is off, but the passengers are so grateful they vow not to reveal what he looks like. Octavius returns, demanding Spider-Man, and subdues the passengers. After knocking out Spider-Man, Octavius delivers him to Harry.
After giving Octavius the tritium, Harry prepares to kill Spider-Man, and is shocked to see it is really Peter. Peter convinces him that there are greater things are at stake, and Harry reveals Octavius' location. Spider-Man arrives at the doctor's waterfront laboratory and tries to rescue Gwen discreetly. One of Octavius' tentacles senses him, and they fight. Spider-Man ultimately subdues Octavius, reveals his identity, and convinces Octavius to let go of his dream for the greater good. Octavius finally commands the tentacles to obey him and drowns the fusion reactor, along with himself, in the Hudson River. Gwen discovers Spider-Man's true identity, as well as why they cannot be together. Peter returns Gwen to John and leaves.
Harry is visited by a vision of his father, pleading for Harry to avenge his death. Refusing to hurt Peter, Harry shatters the mirror, revealing a secret room containing the Green Goblin's equipment and performance enhancers. On her wedding day, Gwen abandons John at the altar and runs to Peter's apartment. She admits her true feelings for Peter. They kiss, and after hearing a police chase, she encourages him to respond as Spider-Man.