When Thor brought Jane to Asgard following her contact with the Aether, Odin demanded she be sent back home. However, when he witnessed the Aether defend Jane from his own guards, he took her and Thor to see the Book of Yggdrasil and learn about the Aether, Malekith, and the Dark Elves of Svartalfheim, whom he thought his father Bor had destroyed.
Not long after, Malekith sent his soldier Kurse into Asgardian custody so that he could kickstart a breakout in the dungeon. In the chaos, Dark Elf Harrows landed in Asgard including one where Malekith marched out into the castle and destroyed Odin’s throne. When Odin returned, it would be too late. Malekith killed the All-Mother while she protected Jane Foster with her magic. Despite Odin and Thor’s arrival, the Dark Elves managed to escape.
After overseeing his beloved wife Frigga’s funeral rites, Odin ordered that Jane Foster be taken into protective custody. In his sorrow and anger, he intended to enact revenge and destroy all of the Dark Elves. However, the God of Thunder had a different plan—he wanted to take Jane to Svartalfheim, drawing Malekith out, so they could destroy him and his weapon. Odin remained concerned that this would simply put the weapon right in Malekith’s hands.
Disregarding his father’s orders, Thor recruited Heimdall, Sif, and the Warriors Three to help get Jane, break Loki out of prison, and use of his secret pathways between realms to get to the devastated land of Dark Elves. As it happened, both Thor and Odin proved correct. Thor separated the Aether and seemingly destroyed it, but the Infinity Stone reconstituted itself and took Malekith as its new host. During the confrontation, Loki seemed to die at the hands of Kurse.
While Thor and Jane traveled to Earth to save it from the Dark Elves, Odin received word that Loki had been killed. However, the messenger who brought the news was none other than Loki himself. He used his sorcery to separate Odin from his powers, removed his memories, and placed him in the Shady Acres Care Home on Earth. Loki assumed Odin’s identity on Asgard, while Thor, Jane Foster, and their friends figured out how to stop Malekith on Midgard.