For Spider-Man 2 (2004), Doctor Octopus is portrayed by Alfred Molina as the main antagonist. Unlike the comic version, the movie version is portrayed as a sympathetic character, married to a woman named Rosalie. He first meets Peter when Curt Connors recommends visiting him sometime. Otto converses with Peter about the experiment that will occur in a few days. He reveals he is experimenting with a substance called tritium that he will introduce to the world as a fusion-based energy source, looking similar to a miniature sun. Not soon later, he begins his experiment with a handful of fellow scientists and reporters looking on, including Peter. Octavius attaches his A.I. tentacles to his waist and back, and the experiment begins. At first, it went very well, with Otto using his tentacles to contain loose fusion beams with his mechanical arms, but it immediately goes wrong and the amount of fusion beams multiply, killing Rosalie and destroying the inhibitor chip that Otto had used to maintain control of the arms. It also fused them to his spine. Once the experiment was thwarted by Spider-Man, he was rushed to the hospital.
His arms, now with a life of their own, kill the doctors while Otto is out cold. Soon, he wakes up and finds that his tentacles have minds of their own now. He blasts out the front door and heads towards a warehouse, which he uses as his base of operations. The tentacles convince Otto that in order to get funding for a new fusion reactor, he must begin a life of crime, becoming Doc Ock. After successfully robbing a bank and combatting Spider-Man while holding a terrified Aunt May, he sends the money away and rebuilds his machine. However, one thing is missing: the tritium. He travels to the home of Harry Osborn, who tells him that he will get the tritium once he brings Spider-Man to him.
The next day, while Peter is having coffee with Mary Jane, Doc Ock crashes in and kidnaps M.J. Peter (who frequently lost his powers earlier, but gets them back at that moment) changes into Spider-Man and follows Doc Ock to a tower on the west side. Their battle starts on the tower's top, where he breaks the big hand of the enormous clock in order to make Spider-Man fall. Ock and Spider-Man soon fall off the tower and fall onto an elevated train. There, they battle outside, with horrified passengers inside. After a long while, he intentionally destroys the train's brakes and captures Peter after he saved the speeding train. Giving Spider-Man's unconscious body to Harry, he snatches the tritium and heads back towards the warehouse. Holding Mary Jane up in metal chains, he begins his new experiment. However, Spider-Man arrives in the nick of time, combatting Octavius once again, and almost gets close to killing Spidey when he accidentally stabs some electric cables attached to the machine. Peter then reveals himself to Octavius, who had been reformed by the blast. The machine once again goes haywire, and Otto decides to drown the machine in the river, bidding Peter farewell. He destroys the reactor's support beams, and it tumbles into the river, taking Octavius with it.