The Dark Elves are the oldest species in existence, having ruled unchallenged for untold ages before the Big Bang, thriving in the shapeless, lightless void the Asgardians call Ginnungagap. After the creation of the current universe, however, the Dark Elves' power waned, their influence in the cosmos grateful reduced with the introduction of manifest light. The Dark Elves eventually settled in Svartalfheim, the darkest and bleakest of the Nine Realms connected by the 'world tree' Yggdrasil, one of the few places in the universe dark enough to sustain them.
For millions of years, the Dark Elves sought to return to their former power. This yearning culminated in the reign of Malekith, an accomplished Dark Elven sorcerer, who obtained the Reality Stone, one of the six Infinity Stones created by the Cosmic Entities from the remnants of a singularity that predated the universe. Malekith was able to manipulate the Reality Stone, turning it into a liquified weapon called the Aether. This weapon had the power to convert matter to dark matter and, in practice, could restore the entire universe to its prior state of total darkness, wiping out every lifeform in existence, with the exception of the Dark Elves, who would again be able to reign supreme
In 2988 B.C., the Convergence, a cosmic event in which the Nine Realms are aligned, took place, opening wormholes between the Realms. Malekith sought to take advantage of the Convergence to begin his genocidal conquest of the universe, beginning with the other Realms.
The Dark Elves came dangerously close to succeeding in their plan to unleash the Aether on the universe, but were prevented by the intervention of the Asgardians, the self-appointed protectors of the Nine Realms. Under the command of King Bor, the Asgardian Einherjar army invaded Svartalfheim, leading to a decisive battle. While the Dark Elves proved worthy foes, the Asgardians were able to push them back, withstanding even the enhanced "Kursed" class of Dark Elf warriors. Bor used a portal opened by Asgard's Bifrost Bridge to take the Aether moments before Malekith finally unleashed its destructive power.
Realizing the battle was lost, Malekith unleashed one last desperate attack, dropping the entire Dark Elf air fleet onto the battlefield, wiping out the majority of both armies and leaving the surviving Asgardians in disarray. Malekith took advantage of the ensuing chaos to escape on the last remaining Ark, along with his lieutenant Algrim and the several dozen warriors who had survived. The Asgardians assumed the Dark Elves had all perished in the battle, however. Bor, realizing the Aether was too powerful to destroy, ordered the weapon to be buried on a distant world where none could ever find it again.
Meanwhile, Malekith and the other surviving Elves entered a state of extended hibernation aboard the Ark, intending to wake when the Aether revealed itself anew and they could make a second attempt at total conquest.
The next Convergence occurred 5,000 years later. Upon investigating gravitational anomalies at a warehouse in London, Jane Foster was transported to the Aether's hiding spot, and was possessed by the Infinity Stone, awakening Malekith and his army, who plotted their next offensive against the Asgardians in their final attempt to regain the Aether and transform the universe into eternal darkness.
Malekith then traveled to Earth, where he came dangerously close to completing his plan, stopped only by the intervention of Thor, Bor's grandson, who did battle with Malekith and slew him, ending the threat posed by the Dark Elves for all time.