Peter Parker (Tobey Maguire) is a nerdy high school senior in New York City. His parents are dead and he lives with his Uncle Ben (Cliff Robertson) and Aunt May (Rosemary Harris). He has a crush on his next door neighbor, Mary Jane Watson (Kirsten Dunst), who is also one of the few classmates who is nice to him. Her boyfriend, Flash (Joe Manganiello) and his buddies pick on him. Peter's only friend is Harry Osborn (James Franco), who, though rich and good-looking, is similarly an outcast. Harry, however, is somewhat jealous of the affection his father, Norman (Willem Dafoe) shows Peter. Norman, the head of weapons contractor Oscorp, appreciates Peter's scientific aptitude and can barely conceal his desire that Peter was his own son.
Peter's science class takes a field trip to a genetics laboratory at Columbia University. The lab works on spiders and has even managed to create new species of spiders through genetic manipulation and combination. While Peter is taking photographs of Mary Jane for the school newspaper, one of these new spiders lands on his hand and bites him. Peter comes home feeling ill and immediately goes to bed. At the genetic level, the venom injected by the spider bite begins to work strange magic on Peter. Meanwhile, General Slocum (Stanley Anderson) visits Oscorp to see the results of their new super soldier formula. When one of Norman's top scientists, Dr. Stromm (Ron Perkins) warns him the formula is unstable, General Slocum threatens to pull all of the military's funding from Oscorp. Later that night, Norman exposes himself to the formula. He gains superhuman strength and agility but is driven insane. He kills Stromm and steals two other Oscorp inventions, an exoskeleton and jet glider.
Peter wakes up the next morning feeling better than ever. He also learns his scrawny physique now ripples with muscles and his eyesight is perfect. At school that day, he learns he can shoot webs out of spinnerettes in his wrists. He demonstrates his own new agility by catching Mary Jane and her food tray when she slips at lunch and then beating an enraged Flash in a fistfight. That night, he and Mary Jane casually flirt across the fence separating their backyards, although Flash breaks this up when he arrives with his new car. Peter believes he needs a car to impress Mary Jane but knows neither he nor the cash-strapped and retired Ben and May would be able to afford one.
One night he spies an advertisement in the paper. A local professional wrestling league will pay $3000 to anyone who can survive three minutes in the ring with their champion, Bone Saw (Randy "Macho Man " Savage). Peter designs a suit and heads out to the arena, telling Ben and May he is going to the library. Ben and May are worried about the changes in Peter's personality and Ben insists on driving him to the library. He tries to explain his and May's concerns. He encourages Peter not to get into any more fights; he might have the power to beat the Flash Thompsons of the world, but "with great power comes great responsibility" -- the responsibility to know when and how best to use that power. Peter reacts badly. He tells Ben he is not Peter's father and should not act like he is. Peter not only survives the wrestling match, he defeats Bone Saw in two minutes. But the promoter pays Peter only $100. Angry at being gypped, Peter stands aside as an armed robber (Michael Papajohn) holds up the promoter. However, when he gets out to the street, he discovers the robber fatally wounded Ben and stole his car. In anguish, Peter chases down the robber and beats him. The robber falls out of a window where his body is recovered by the police. That same night, a menacing figure wearing the stolen Oscorp exoskeleton and riding the jet glider attacks a weapons test at Quest Aerospace, Oscorp's chief competitor. Their prototype is destroyed and General Slocum is killed.
Peter is inspired by Ben's admonition to use his spider powers for the greater good. He designs a new costume and swings around New York, foiling petty robberies and muggings as the Amazing Spider-man, a name he borrows from the announcer at the wrestling match. This does not endear him to J. Jonah Jameson (J.K. Simmons), the editor and publisher of the Daily Bugle, New York's leading muckracking tabloid. However, when he learns Spider-man sells newspapers, he puts out a call to photographers for better photos for his front page. Peter, Harry and Mary Jane graduate from high school and move to Manhattan. Peter and Harry get a loft together and attend classes at Empire State. Mary Jane works as a waitress and struggles to get acting auditions. She and Harry also begin seeing one another. Harry apologizes to Peter but points out Peter was always too shy to make a move himself. Peter struggles to hold down a job. Norman offers to help him find one but respects Peter's desire to make his own way in the world. Peter sees Jameson's advertisement for good photos of Spider-man and, webbing his camera in convenient places, gets excellent photos of his own heroic actions. Although Jameson doesn't pay well, he agrees to buy more of Peter's photos.
Norman is also happy; Quest has to reorganize after the debacle that killed Slocum, Oscorp has more government contracts and the company's stock is soaring. He is crestfallen to learn the Board of Directors has chosen this moment to accept a buyout offer from Quest. His insanity manifests itself in a split personality: the driven yet confused Norman, and the murderous, scheming villain who will soon become known as the Green Goblin. As the Goblin, he attacks Oscorp's annual Unity Day street fair and kills the Board of Directors. His attack also endangers Mary Jane. Spider-man fights off the Goblin and rescues Mary Jane when she nearly falls to her death. Mary Jane finds herself falling in love with Spider-man, a feeling only reinforced when he saves her from some rapists a few days later. This time, she thanks him with a deep kiss. She doesn't know he is really Peter.
The Goblin decides he and Spider-man should be partners. He attacks the Bugle offices to lure Spider-man into a trap, then gives Spider-man a few days to think over his offer of partnership. He warns Spider-man the city will eventually turn against him, and that they should rule it together. A few days later, on Thanksgiving, Goblin stages a fire in an apartment building to get an answer from Spider-man. Spider-man refuses to join with Goblin, and the two fight. Spider-man receives a bad cut on his arm. As Norman and Peter, the Goblin and Spider-man are due at the loft for Thanksgiving dinner. They each race back separately. When Peter arrives to dinner with fresh blood from the cut on his sleeve, Norman realizes Peter is Spider-man and hastily leaves. On the way out, he insults Mary Jane and she leaves, hurt that Harry didn't defend her. That night, Goblin attacks Aunt May at home, sending her to the hospital. While visiting her, Mary Jane reveals her crush on Spider-man to Peter but they wind up having an intimate moment themselves. Harry sees this and knows his relationship with Mary Jane is over.
Goblin decides to strike at Spider-man through Mary Jane. He kidnaps her, then sabotages a trolley car along the Roosevelt Bridge. When Spider-man arrives, Goblin gives him the choice of saving Mary Jane or the trolley car, then drops them both from the bridge. Spider-man manages to save both, with an assist from a passing barge and pedestrians on the bridge who pelt Goblin with debris and delay him from his attempts to kill Spider-man. Goblin instead grabs Spider-man and throws him into an abandoned building. The two fight, and the Goblin nearly wins until he makes the mistake of threatening Mary Jane. Enraged, Spider-man beats Goblin but stops when he learns Norman is the Goblin. Goblin tries to use his jet glider to kill Spider-man but he leaps out of the way just in time; Goblin is impaled and killed. Spider-man takes Norman's body back to his penthouse apartment. Harry sees them and blames Spider-man for Norman's death. At the funeral, he vows revenge and thanks Peter for being such a great friend.
Peter goes to visit Uncle Ben's grave. Mary Jane finds him there and confesses her love for him. She kisses him tenderly, passionately. Peter wants to tell her the truth but can't. Instead, he tells her he can never be more than her friend. Mary Jane has an inkling that she might have kissed him before but Peter walks away, knowing both his blessing and his curse in life: "Who am I? I'm Spider-man."