Eons ago, Bor, the father of Odin, clashes with the Dark Elf Malekith, who seeks to destroy the universe using a weapon known as the Aether. After conquering Malekith's forces, including enhanced warriors called the Kursed, on their home world of Svartalfheim, Bor safeguards the Aether within a stone column. Unbeknownst to him, Malekith, his lieutenant Algrim, and a handful of Dark Elves escape into suspended animation.
In present-day Asgard, Loki stands imprisoned for his war crimes on Earth. Meanwhile, Thor, alongside warriors Fandral, Volstagg and Sif repel marauders on Vanaheim, home of their comrade Hogun; it is the final battle in a war to pacify the Nine Realms following the reconstruction of Bifröst, the "Rainbow Bridge" between realms, which had been destroyed two years earlier. In London, astrophysicist Dr. Jane Foster's intern, Darcy Lewis, now with her own intern, Ian, takes Jane to an abandoned factory where objects have begun to disobey the laws of physics and disappear into thin air. Separating from the group, Jane is teleported to another world, where she is infected by the Aether.
The Asgardians learn that the Convergence, a rare alignment of the Nine Realms, is imminent; as the event approaches, portals linking the worlds appear at random. Heimdall alerts Thor of Jane's recent disappearance, leading Thor to search for her. When she inadvertently releases an unearthly force while being arrested by the police for trespassing on private property, he takes her to Asgard. However, the Asgardian healers say they do not know how to treat her. Odin, recognizing the Aether, warns Jane's infection will kill her given enough time, and that the Aether's return heralds a catastrophic prophecy.
Malekith, awakened by the Aether's release, turns Algrim into a Kursed and attacks Asgard. During the battle, Malekith and Algrim search for Jane, knowing she contains the Aether. When they fail to capture her, they escape, but not before killing Thor's mother Frigga in a swordfight. Despite Odin's orders not to leave Asgard, Thor reluctantly teams up with Loki, who knows of a secret portal to Malekith's world, where they will use Jane to lure and confront Malekith, away from Asgard. In return, Thor promises Loki that he can have his revenge on Malekith for killing their mother. With Volstagg and Sif stalling Asgardian soldiers and Fandral assisting their escape, Thor and Loki commandeer a Dark Elf spaceship and escape to Svartalfheim with Jane.
On Svartalfheim, Loki tricks Malekith into drawing the Aether out of Jane. However, Thor's attempt to destroy the substance fails, and the Aether-empowered Malekith leaves with his ship as Loki appears to be fatally wounded while protecting Thor from Algrim. Thor, cradling Loki in his arms, promises to tell their father of his sacrifice. Following Loki's apparent death, Thor and Jane discover another portal in a nearby cave and reunite with Jane's mentor Dr. Erik Selvig, Darcy and Ian in London. There, they learn that Malekith plans to unleash the Aether to destroy the universe, and that he will do this in Greenwich, the center of the Convergence. Thor battles Malekith, but a portal separates them, leaving Malekith unopposed. Thor comes back in time to help his mortal comrades use their scientific equipment to transport Malekith to Svartalfheim, where he is killed before he can destroy the universe.
Thor returns to Asgard, where he declines Odin's offer to take the throne and tells Odin of Loki's sacrifice. As he leaves, Odin's form transforms to that of a grinning Loki.
In a mid-credits scene, Volstagg and Sif visit the Collector and entrust the Aether to his care, commenting that, with the Tesseract already in Asgard, having two Infinity Stones so close together would be dangerous. As they leave, the Collector remarks, "One down, five to go." (Foreshadowing the Guardians of the Galaxy movie.) In a post-credits scene, Jane and Thor reunite on Earth, while somewhere in London a frost monster from Jotunheim, accidentally transported to Earth during the final battle, continues to run amok.