Long before the Nine Realms came into existence, the Dark Elves were an advanced race whose history predated even Asgard. When life and civilizations started to grow around them, the Dark Elves failed to adapt to this change in environment and sought a way to reverse the universe back to that which they preferred; the method of their choice was genocide.
Malekith, a leader of the Dark Elves, formulated a plan to use the Aether to destroy the Nine Realms. With the Convergence, the alignment of realms, approaching, Malekith saw this as the perfect opportunity to unleash the Aether against all of the realms at once.
In 2988 B.C., the Convergence finally began, and the Dark Elves were prepared to begin their plan. However, an Asgardian army led by Bor confronted the Dark Elves at Svartalfheim, having learned of their intentions. A major battle ensued, exhausting many of the Dark Elves and the Einherjar. Seeing that his forces were being expended at a dangerous rate, Malekith chose to use the Aether quickly, only for the Asgardians to warp it from the battlefield using the Bifrost Bridge.
Realizing that they could not win, Malekith and Algrim with the surviving Dark Elves fled in one of their Arks, leaving the rest of their people to die. Entering suspended animation, Malekith planned to awaken when the Convergence reoccurred, thereby allowing him to repeat his original plan. Believing Malekith to be dead, Bor hid the Aether away, as it could not be destroyed.
Nearly 5,000 years later, the Convergence finally began once more. Jane Foster accidentally stumbled upon the Aether after the Convergence warped her to its location from London, and became its unwilling host. Her unintended use of the Aether awakened Malekith and his crew, who pursued Foster across the Nine Realms before obtaining it on Svartalfheim.
Malekith then traveled to Earth, where he came dangerously close to completing his plan if not for the intervention of Thor, Bor's grandson, who did battle with Malekith and slew him, ending the Dark Elves' reign.