Loki is the adopted son of Odin and Frigga, as well as adopted brother of Thor. He is seen as an envious and a violent man who will stop at nothing to banish Thor and kill him. When Thor was supposed to be crowned. As a prank to 'ruin his brother's big day', Loki allowed several Frost Giants to steal the Casket of Ancient Winters. Thor, upset by the turn of events, leads Loki, Sif and the Warriors Three to Jotunheim where a battles begins. During the fight, Loki is touched by a Jotun and does not react to the Frost Giant's freezing touch. The fight is interrupted when Odin comes and takes them back to Asgard. Odin, disappointed for Thor's actions, banishes Thor powerless to Earth until he became worthy once more by picking up Mjolnir.
Loki then appears in the armory and questions Odin about his true heritage. Odin reveals that Loki is actually a Frost Giant that he found during a war. Before Loki can find out the full truth, Odin falls into the 'Odin-sleep'. While Odin is asleep, Loki becomes king of Asgard and forbids Thor from returning. Loki then travels to Earth and tells Thor that he is banished to keep Asgard from going to war with Jotunheim and that Odin is dead.
When Loki discovers that Sif and the Warriors Three have gone to earth to retrieve Thor, he sent  the Destroyer to make sure they do not return. Loki then brings in Jotuns to kill Odin, but later betrays them. After Thor regains Mjolnir and defeats the Destroyer, Thor then returns to deal with Loki. Loki likewise orchestrated an invasion by the Frost Giants, although he quelled the invasion and killed their leader in an attempt to gain Odin's trust. When Thor comes back to face Loki in Asgard and he tries to fight him as he wants to stop Loki from destroying Jotunheim. Thor then breaks the Rainbow Bridge that binds Asgard to other worlds. As Thor and Loki cling to the broken bridge, Odin wakes from the Odin-sleep and saves them. Loki then tells Odin that he could have been king and that destroying Jotunheim was for the best. Odin replies by saying no and Loki lets go, falling into a dark abyss.
After falling through the wormhole, Loki arrived in a part of the universe unknown to both the Asgardians and humans and came into contact with The Other, a servant of Thanos, who offered a pact that would allow him to become ruler of the Earth while Thanos and the Chitauri would take the Tesseract, the cosmic cube left on Earth being studied by S.H.I.E.L.D. Thanos gave him ancient knowledge through the powers of the Tesseract, providing him with a golden bladed scepter with a blue gem that was powered by the cube itself. It acted as a very powerful weapon, and also as a mind control device, bending those who were touched by the gem's power to its will.
After accepting the deal, Loki turned his focus back to Earth in search of a suitable agent, someone close to the Tesseract. He found Erik Selvig, a friend of Thor's and a renowned astrophysicist, who had been summoned to the task of unlocking the secrets of the mysterious cube. In time, Selvig came to understand some of the Tesseract's capabilities, and through Loki's influence he developed equipment that would focus some of that power. When the time was right, Loki activated the Tesseract, forming a temporary portal that pulled him through to its location on Earth. He was immediately confronted by S.H.I.E.L.D. agents who fired guns at him only to learn that bullets bounced off of his body. Nick Fury attempted to keep him away from the Tesseract after, but Loki managed to use the scepter to subjugate and control Hawkeye and Selvig, as well as a number of other agents by placing the tip of the scepter at their chest near their heart and allowing the power of the gem to overtake them. He explained to Nick Fury that he wanted the Tesseract as part of his 'glorious purpose' which was to free the earth and humanity from 'freedom... life's great lie' as their one supreme king.
Fury tried to flee with the Tesseract, but then decided to stay and allow himself to die with the cube if it meant stopping Loki as well. Selvig and Hawkeye informed Loki of Fury's intent, prompting Loki to gather the turned agents and leave with the Tesseract after attempting to kill Fury, avoiding Maria Hill's attempt to stop them. The energy it had unleashed consumed the area and the entire S.H.I.E.L.D. compound with it. After securing an area to determine the next course of action for the cube, Loki noted the scepter's gem glowing and calling out to him. He allowed himself to enter a trance where he could appear to the Chitauri leader and his army in a metaphysical form. The Chitauri leader warned Loki that if he failed at his pursuit of earth and the Tesseract did not fall into their hands to be given to Thanos, that there would be no place for him to hide from the overlord's wrath and that he would beg for something as sweet as pain. Now unsettled about potential failure and more determined than ever, Loki went to Stuttgart, Germany with Hawkeye and other turned agents in order to retrieve iridium, necessary to stabilize the portal.
Here he disrupted a gala at a large museum while Barton raided a secure installation for iridium. Loki struck terror into the hearts of patrons and guests by securing the one thing needed for Hawkeye to breach the iridium lock's security measures: the curator's eyeball. Loki strode out after the screaming crowd into the streets where he made several copies of himself, trapping the people and demanding that they kneel before him. Loki bragged that this was man's purpose, but a single man challenged him and his intentions. When Loki prepared to kill the old man, Captain America appeared and challenged him. Seconds later, the Quinjet carrying Black Widow also challenged him from the sky. After a brief battle with the super-soldier, during which Loki had the upper hand, Iron Man arrived and threatened to fire upon Loki, daring him to make a move. Outnumbered, he allowed himself to be captured, secretly plotting to use this to his advantage. As they journeyed to the S.H.I.E.L.Ds Helicarrier, Thor arrived and extracted Loki from the jet.
Thor attempted to reason with Loki, imploring him to remember that they were brothers (even if not by blood) and to return home to Asgard and surrender the Tesseract. Loki, however, still resented his brother, and refused to cooperate. Thor was tackled by Iron Man before he could say any more, and Loki remained on his perch as he watched them battle before agreeing to ally themselves. They took him into S.H.I.E.L.D. custody aboard the helicarrier, where he was placed in a confinement capsule designed to hold the Hulk. Loki taunted Fury about his attempts to control the Tesseract and his gathering of misfits to defend Earth. Loki's mere presence was enough to provide a disruptive element that would fragment the only group of heroes that had any hope of stopping him. When Black Widow arrived to speak with him, apparently to offer a deal in exchange for Hawkeye's freedom, he subjected her to a play of wits where he ferreted out her deeper misgivings, but was completely caught off guard when she tricked him into revealing that there was already a monster among them and that it was not him. From this, she concluded that the monster was Banner and that he had planned to use the Hulk to destroy the ship and the heroes as well.
However, Loki's plan to use the Hulk, only one aspect of his real intentions, did follow through as another jet carrying Hawkeye and the rogue agents came to his aide, following a signal from the scepter. The wounded Banner transformed into the Hulk, destroying much of the helicarrier, while one of Loki's controlled agents freed him from the cell. Loki then used illusions of himself to trick Thor into entering the cell and to distract Agent Coulson. Loki mortally wounded Agent Coulson and ejected Thor's cell from the helicarrier. Though he retrieved his scepter, Hawkeye was released from the mind control, and Loki headed to New York, where Selvig waited with the Tesseract at Stark Tower.
Loki prepared to welcome his army and begin his glorious, but brief, war on the earth. Tony Stark, still alive after the raid and having figured out his plan, caught up with him at the Tower and abandoned his wrecked Iron Man suit to threaten him. When Loki grew weary of the threats he tried to subjugate Stark with the scepter, only to be physically blocked by the arc reactor in Stark's chest. Annoyed, he threw the inventor out of a window, and was surprised when a freshly built Iron Man armor rocketed out after the man. Loki found himself briefly under attack when the fully suited Iron Man rocketed back up to retaliate before the Tesseract opened the portal, allowing Loki's Chitauri army to come pouring through. With his triumph near at hand he was confronted by his brother, Thor, who demanded that he at once deactivate the Tesseract or the thunder god would destroy it. Loki refused, claiming that nothing could stop his war.
The brothers fought a second time, Loki's scepter matching Thor's hammer. Blasts from the gem almost completely destroyed the Stark Tower logo on the side of the balcony, blasting the giant letters and debris off the side. When the confrontation came to stalemate with them grappling each others' necks, Thor urged Loki to look around him at the destruction he caused and asked if he truly believed it would all end with his rule. While Loki was unsure of himself, his eyes reverted to their normal green state temporarily as he claimed it was too late to stop the madness, but briefly considered Thor's appeal to work together to end it all and redeem himself. The will of the Tesseract over his mind was stronger than his guilt, however, and he instead stabbed Thor with a throwing knife, preparing to strike him down with the scepter as he knelt before him and laughing in amusement at the sentiment. This did little more than enrage the thunder god, who disarmed his adoptive brother of his staff and picked him up before slamming him down hard on the ruined balcony.
Loki threw himself off the building as he was defeated and managed to land on one of the Chitauri's small flying craft. From there, he led an attack on the city. When the first of the Chitauri's massive Leviathans was detroyed by the Hulk, he commanded the Chitauri on the other side of the still-open portal to send the rest of their massive armada, overwhelming the city's defenses. An aerial chase after Black Widow left his craft destroyed by one of Hawkeye's arrows and Loki landed back on Stark Tower, where the Hulk confronted him. Loki's frustrated rant goaded the Hulk into simply picking him up and repeatedly slamming him into the ground. Loki was too stunned to fight or threaten any longer, more wounded physically than he had ever been before.
When he eventually summoned the strength to crawl, he found himself face to face with six of the Earth's mightiest, having defeated the Chitauri army and closing the portal, he quietly requested the drink that Stark had offered before. After the Tesseract was relinquished to Thor, Loki was bound and placed in a metal muzzle (likely to prevent pleading, threatening, or perhaps use of magic) and led to an open area in Central Park with his brother. From there, Thor used the power of the Tesseract to transport both of them home to Asgard.
Loki is taken back to Asgard and brought to his father Odin to answer for his crimes. While Frigga is more than relieved to see him alive, Odin is disappointed in his crime for not only causing treason, but for also leading the Chitauri attack on New York. Loki shows no sign of remorse, thinking he committed a benevolent act as a god. Odin thinks otherwise and adds that if it weren't for the compassion of Frigga, Loki would probably be dead. Odin sentences him to spend the rest of his days in the dungeon. While Loki dwells within confinement, he watches from his cell as Fandral and Volstagg bring in some prisoners, including a disguised Algrim. Loki is visited by Frigga, in the form of a hologram, and expresses her concern toward him, he still has deep compassion for his mother though he brushes it off, becoming further doubtful of his family's acceptance of him.
When Algrim, who turns into Kursed, causes a prison break, Loki's cell is left untouched by the dark elf, but he does give advice to Algrim on how to sabotage Asgard's defenses. Loki then returns to his boredom, but is then informed by a guard that Frigga was killed in the attack, evidently causing despair for Loki, as he nearly destroys everything in his cell in a fit of grief and rage. It is not until later on that Thor eventually comes to Loki and sees the effect Frigga's death had upon him. Thor then offers Loki his freedom in exchange for aid against Malekith, in order to enact vengeance for Frigga. Loki knows that Thor is desperate to come seek help from him, though Thor believes that the man he once called his brother is still in Loki. He agrees to help Thor in using diversion tactics. When they meet with Jane Foster (the current host of the Aether), and Sif, Jane slaps Loki for his attack on New York. Sif also promises to kill Loki if he betrays them. With the aid of his allies, Thor, Loki, and Jane escape into the crashed dark elf ship. The Asgardian warriors chase after them until they hop out of the ship and onto a smaller craft flown by Fandral. As he lets the trio make their way out, Loki uses a hidden passageway within Asgard to get to Svartalfheim.
Once they arrive, Loki betrays Thor by stabbing him and then slices off his hand to prevent him from summoning Mjolnir. He throws Jane before the dark elves, claiming his allegiance with them to spite Asgard. Malekith begins to transfer the Aether within Jane to himself. However, the process is interrupted by Thor, where it is revealed that Loki's betrayal was all an illusion to allow Thor to attack unexpectedly. Thor then uses Mjolnir to destroy the gathering Aether with lightning; unfortunately, as Aether cannot be destroyed, the substance quickly reforms and completes its transfer into Malekith. Malekith and the dark elves then make their way toward their giant vessel as Thor attacks them. Algrim throws one of their vortex weapons in the air, which almost catches Jane. But Loki pushes Jane away from it, and is nearly sucked in until Thor pulls him away. Thor fights back against Algrim, but the Kursed beast brutally beats him down. Algrim proceeds to kill Thor himself, but Loki uses a sword to stab Algrim from behind. However, the sword proves ineffective on Algrim, who then grabs Loki and impales him with the very sword he had used against him, and is thrown to the ground. While Algrim gloats in his victory, Loki declares, "See you in Hel, monster," as Algrim quickly realizes that the blade is attached to his own vortex weapon, destroying Algrim before he can react. As Loki lies dying, Thor clutches his brother in his arms, calming him down and vows to tell Odin about Loki's deed, but it is too late; Loki replies to Thor, "I didn't do it for him" before closing his eyes and quietly dies as his skin returns to its blue Frost Giant form. A grief-stricken Thor is left to mourn for Loki's sacrifice.
After Thor and Jane depart for Earth, Loki awakens, confirming his death to be false and disguises himself as a warrior and returns to Asgard to tell Odin that Thor had disappeared with his hammer left behind, and reports to Odin that Loki's body has been found.
After Thor defeats Malekith, Thor returns to Asgard and declines Odin's offer to take the throne while telling Odin of Loki's sacrifice. He offers Mjolnir to Odin, but he tells him it belongs to him if he be worthy of it. Thor thanks Odin and walks away. As he leaves, Odin's image shapeshifts into none other than Loki. Now seated in the throne he had long desired, he quietly answers, "No. Thank you."