In Spider-Man 2, Peter Parker gives up being Spider-Man, returns to the role, and stops Octavius's fusion reactor at the cost of Octavius's life, after Doctor Octopus kidnaps Mary Jane Watson.
Peter is worn down by money trouble, school and the demands of his double life. He believes his secret puts Mary Jane in danger, so he keeps away from her, and she later gets engaged to the astronaut John Jameson.
Harry Osborn, who now runs Oscorp, backs the fusion project of Dr. Otto Octavius, Peter's mentor. The reactor goes out of control during the public demonstration, Octavius's wife dies, and four AI driven mechanical arms fuse to his spine. The arms take over his mind, and he starts robbing banks to rebuild the reactor.
Doctor Octopus beats Spider-Man in their first fight. Peter's powers then begin to fail and he gives up the costume. A fatal fire and his guilt over a death bring him back to the role.
Harry blames Spider-Man for his father's death and offers to hand Spider-Man over to Octavius in return for the reactor materials. Octavius kidnaps Mary Jane, and he and Spider-Man fight across a speeding elevated train. Peter saves the passengers, collapses from the effort, and is carried to safety by the passengers.
Peter removes his mask, and Octavius is persuaded to resist the arms. He sinks the reactor into the river and drowns it, dying in the process. Peter rescues Mary Jane, while Harry sees Peter's identity and finds his father's Green Goblin gear. Mary Jane leaves her wedding to John Jameson to be with Peter.