Five years ago, half of all life on Earth was suddenly extinguished. Thanks to the Avengers, however, all those who had been lost returned to life in what would become known as "the blip". Iron Man's sacrifice in the final battle against Thanos has left a considerable void in the world, however, and the question of who can succeed him is on everyone's mind...
Chief among them is the Spider-Man, Peter Parker, who is trying to enjoy a moment of peace and normalcy as his life is put back together. He is excited for a school trip to Europe, where he plans to admit his feelings for one of his classmates, Michelle "MJ" Jones. Before leaving for the school trip, however, he is informed by Happy Hogan, an old friend of Tony and member of SHIELD, that Nick Fury is trying to contact him. Peter doesn't want to partake in any superheroics, however, and refuses to talk with Fury over the phone.
The first stop of the class trip is Venice, Italy. After buying a Black Dahlia necklace that he plans to give to MJ when he admits his feelings, the city is suddenly attacked by a giant water monster. Peter doesn't have his suit on hand, having left it in his suitcase, but using a paper mask, he attempts to subdue the monster and minimize the damage to the city while protecting his friends. During the melee, a mysterious man in a green costume with an opaque glass helm enters the fray, using powerful magic to destroy the monster before it can cause anymore devastation.
Peter's class meets back a in hotel, where Peter comes face-to-face with Nick Fury. At his insistence, Peter accompanies him into Venice's sewers, along the way receiving a memento from Tony Stark: a pair of glasses that contain an AI named "EDITH" (Even Dead, I'm The Hero) and access to a Stark Industries satellite with attack drones.
In the sewers, Peter meets the man that had saved the city and came to be known as "Mysterio": Quentin Beck. According to this hero, a new threat menaces the Earth, one that hails from an alternate reality: four deadly creatures known as the "Elementals". Each Elemental embodied the classical elements of wind, earth, water, and fire. The Wind and Earth Elementals had already been defeated by Beck, and with the Water Elemental felled, all that remained was the Fire Elemental, which could completely destroy the Earth if not stopped — the same sordid fate that befell the Earth of Beck's home universe.
Fury wants Peter to accompany Beck to Prague, Czech Republic, to defeat the Fire Elemental. Such a threat, however, is more than Peter thinks he can handle, and he declines. Unfortunately, when he returns to the hotel, he learns that the class's trip was taking a detour: instead of Paris, where Peter hoped to admit his feelings for MJ, they will be going to Prague.
In Prague, Peter uses his connections with Fury to arrange for his class to be safe inside an opera house while he contends with the Fire Elemental, donning a new black suit to keep his secret of being Spider-Man safe. Before the Elemental appears, Peter and Beck have a heart-to-heart where the young hero confides that all he wants is to lead a normal life. Beck assures him that it's normal to want a normal life, but that being a hero means he has to be willing to cast that aside and do what it takes to save the people.
The Fire Elemental appears, and begins to absorb the surrounding metal, growing larger and more powerful. The monster proves to be more powerful than Peter can contend with, but Beck manages to slay it by flying into it and destroying it from within, nearly dying in the process. After recuperating, Peter comes to believe that Tony left his glasses to him, not to name him as his successor, but so Peter could choose the successor. He leaves the glasses, and control over EDITH, in Beck's hands, believing him to be the best person suited for protecting the world in a post-Stark world.
After Peter leaves to rejoin his class, however, Beck celebrates his gaining control over EDITH by gathering his allies — disenfranchised Stark Industry employees. Beck was never an interdimensional hero, but a bitter scientist who created the holographic technology that Tony used for what he believed to be poor reasons, and was fired for being mentally unstable. The Elementals were actually holograms created by Beck, along with his Mysterio persona and "magic" abilities. With control over EDITH, Beck could make himself a famous hero by using both his holograms and a massive army of drones to wreak havoc in London, only to come in and save the day.
As Peter tries to finally admit his feelings to MJ, she deduces that he is actually Spider-Man based on his bizarre behavior and strange disappearances. During the awkward conversation that follows, they accidentally stumble upon a holographic projector used to create the Elementals and Mysterio. Realizing that Beck is a fraud, Peter races to Berlin to inform Fury.
Unfortunately, Beck is one step ahead of him, having found that one of his projectors were missing and deducing Peter and MJ figured out his secret. He uses his holograms to mentally torture Peter, coaxing him to admit that he told MJ and his friend Ned about his scheme. Determined to keep his plot a secret, he lures Peter into the path of an oncoming train before planning to kill his friends.
Awakening in the Netherlands, Peter calls for a ride from Happy. He is beside himself with grief and anguish at having been tricked by Beck into relinquishing control over EDITH and now possibly endangering his friends, stating that he's not worthy of being Tony's successor. Happy assures Peter that Tony was far from a perfect man, that he messed up and second-guessed himself all the time... and that he wouldn't have sacrificed himself unless he was certain that Peter could step up to the plate.
With a new custom-built Spider-Man suit, Peter makes his way to London as Beck uses his holograms and the EDITH drones to menace London with a massive fused Elemental. Peter manages to disable the drones before contending with Beck himself, using his spider sense to see through Beck's illusions and close in on him. Beck ends up taking a shot from one of the drones as Peter retakes the EDITH glasses as Beck dies, but not before leaving Peter with an ominous taunt...
Peter and MJ finally reconcile their feelings for one another and begin a relationship as they return to New York. Not long after returning, however, a news bulletin catches Peter's attention as it showed footage from the attack on London. Beck had not only released doctored footage of the attack to the Daily Bugle blaming Spider-Man for the crisis, but also outed Peter's secret identity to the entire world.