It has been a few years since Peter Parker's encounter with a genetically engineered spider turned him into the amazing Spider-Man, and now, he's at the top of his game. The people of New York love him, he has a steady job with the Daily Bugle, he is acing his college classes, and he is going steady with Mary Jane Watson, who is enjoying a career as a Broadway actress. There is one thing still troubling him, though: the fact that his best friend, Harry Norman, knows that he is Spider-Man, whom he blames for the death of his father Norman: the Green Goblin. At the same time, a meteorite falls to the earth, a black gooey mass attaching itself to Peter's bike and sneaking into his home.
His problems seem far away, however, as he visits his Aunt May to tell her of his plans to ask MJ to marry him. Excited, Aunt May gives Peter her blessing, as well as the engagement ring his Uncle Ben gave her on the day he proposed to her. On his way home, however, he is blindsided by Harry, who had taken the strength-enhancing chemical gas that turned his father into the Green Goblin and is hell-bent on revenge. A brawl breaks out between the two that ends in Harry being hospitalized and suffering from retrograde amnesia: as far as Harry knows, he and Peter are the best of friends, and he doesn't remember that he is Spider-Man...
Meanwhile, a convicted murderer named Flint Marko has escaped from prison. After visiting his ailing daughter one last time, he runs from the authorities and finds himself trapped in an experimental particle accelerator which deconstructs his body and fusing it with nearby sand. His consciousness, however, remains intact, and he finds himself able to transform his body into sand, thus becoming the Sandman.
For Peter, things begin to take a turn for the sour when MJ's performance in Broadway was critically panned, and Peter finds himself fumbling his attempts to reassure her. Their relationship grows even rockier when Peter, as Spider-Man, kisses Gwen Stacey, the police chief's daughter and Peter's friend from college. Peter also finds that Eddie Brock is posed to replace him at the Bugle. And to make things even worse, Peter soon learns that the man he thought was responsible for his Uncle Ben's murder, Dennis Carradine, was not the man who pulled the trigger, but an accomplice to the real murdered: an escaped convict named Flint Marko.
As Peter feels that he is at his lowest point, the black mass suddenly crawls onto him and fuses with him. Once Peter realizes what is going on, the black mass had taken on the appearance of his Spider-Man suit, only a sleek shade of black. With this new suit, Peter pursues Marko. The first time Spider-Man and Sandman fought, the Sandman overpowered him. This time, however, Spider-Man corners him in the underground subways and sewers and seemingly killing him by washing him away.
Under the influence of the black symbiote that fused with him and turned into his costume, Peter's personality begins to change, making him more aggressive and less compassionate. These changes cause him to be alienated from MJ, whose career in Broadway is crashing and burning. She is eventually driven to Harry, who is beginning to regain his memories of Peter's secret identity. Determined to hurt Peter, Harry blackmails MJ into breaking up with him, then taunts Peter with the fact that she was seeing him now. Peter and Harry have another fight, with Peter taunting Harry with the fact that his father preferred him. Harry throws a bomb at Peter, but Peter manages to throw it back at Harry, disfiguring his face.
Embracing his new personality, Peter torpedoes Eddie Brock's career by exposing him as a plagiarist who doctored his photos. Afterwards, he starts dating Gwen Stacey, taking her to a nightclub where MJ started working as a lounge singer after her own career on Broadway ended. Peter tries to make MJ jealous, his attempts making Gwen uncomfortable. The two have a bitter argument which ends in Peter striking MJ in anger. Realizing what happened, and what the symbiote is doing to him, Peter retreats to a church and tries to strip off the symbiote, but it resists. When the church's bell rings right next to Peter, however, the symbiote's grip on him weakens. Eventually, using the loud noise of the church and his own willpower, Peter manages to separate himself from the symbiote and strip it off of his body, freeing himself from its control.
Unbeknownst to him, Eddie Brock had stopped by the church, his career and life in shambles, to pray to God for Spider-Man's death. His prayers are unexpectedly answered when the symbiote finds him...
With memories of Peter's secret identity from the symbiote, Brock, now the entity known as Venom, works with Flint to destroy Spider-Man, kidnapping MJ to lure him out. Realizing he is potentially outmatched, Peter tries to ask Harry for help. When he is rebuked, Peter goes to fight Sandman and Venom alone. After Harry's butler reveals the truth of the night that his father died - that Spider-Man brought Norman back to the mansion after he died by his own hand, Harry joins the fray.
In the battle, Venom tries to impale Peter, but Harry takes the fatal blow for him. Afterwards, Peter exploits the symbiote's weakness to high-pitched noise, surrounding Venom in a prison of metal bars before beating on them, separating the symbiote from Eddie. Peter then throws a bomb at the symbiote to destroy it. Brock dives after the symbiote, wanting to regain its power, but dies in the explosion.
Afterwards, Flint explains to Peter that he had never meant to hurt his Uncle Ben; Ben tried to talk him down and help him, his death haunted him every day afterwards. Peter ultimately decides to forgive Flint, who flies away. Peter then comforts Harry along with MJ as he draws his last breath, the three friend reconciling one last time.