Loki is the main antagonist in Thor and The Avengers and a supporting protagonist in Thor: The Dark World. Loki was Adopted by Odin and Frigga at the end of the Asgardians' war with the Jotuns, Loki was treated as a prince of Asgard and never informed of his true heritage throughout his youth.
ThorJealous of his brother Thor, Loki allowed several Jotuns to enter Asgard to try and steal the Casket of Ancient Winters during Thor's coronation.
In the wake of this intrusion, Thor opted to launch a counterattack on Jotunheim with a number of his friends, and while Loki initially tried to dissuade his brother, he eventually relented and went along with the plan.
Upon their arrival at Heimdall's observatory, Loki attempts to use his cunning to trick Heimdall into letting them enter Jotunheim. However, Heimdall already knows of the group's plans, and embarrasses Loki. Heimdall tells the group he wants to know how the Jotuns made it into the kingdom without his knowledge, and opens the Bifrost to Jotunheim.
Once on Jotunheim, Thor again led them into conflict and attacked the Jotuns even after being granted safe passage home. During the ensuing fight, Loki was surprised by his own resistance to the Jotuns' freezing touch, a revelation that led him to conclude that he was at least partly Jotun rather than an Asgardian as he had been led to believe.
Despite the groups best efforts, they eventually become gravely outnumbered, and during the fray, Fandral is impaled through the chest by a shard of ice. While the rest of the group begins to retreat, Thor continues his assault, blind to his friend's peril.A large monster awakens during the battle, and attacks the group, but is killed by Thor moments before it can strike. As the remaining Jotuns surround the group, the Bifrost activates and drops Odin, mounted upon his octopedal horse Sleipnir, into Jotunheim. He attempts to talk Laufey into a peace, but Laufey attempts to attack, and Odin retaliates, and Heimdall activates the Bifrost and pulls the group back to Asgard.
In the healing chamber, Loki reveals to Sif and the Warriors Three that he in fact told Heimdall to inform Odin that they were heading to Jotunheim. Upon the other's questioning, Loki tells them he did it as he felt Thor was foolish to seek battle with the Jotuns. He goes on to say that he did not, however, expect Odin to banish Thor for his arrogance and stupidity.Loki leaves the room, and heads to Odin's vault, where he picks up and holds the Casket of Ancient Winters. Even while grasping it with both hands, Loki's skin is not affected by The Casket. Sensing Odin's arrival in the vault, Loki asks him if he is cursed, to which Odin replies no. Loki turns to him, his skin entirely blue and eyes bright red. Odin states that The Casket was not the only thing taken out of Jotunheim that day.
Odin explains that when he entered the Jotun temple, he found a small infant, Laufey's son. Laufey had hidden the boy away, ashamed that the boy was born a runt and not a giant. Odin tells Loki that he was that infant, and he took him home to Asgard where he raised him as his son.Loki refuses to beleive that taking him in as his own son was Odin's only motive, and Odin reluctantly reveals that he thought bringing Loki in could one day lead to a peace between Jotunheim and Asgard.
Loki, wracked with emotion, accuses Odin of favoring Thor over him, and cries out with rage. The stress of banishing Thor, coupled with Loki's distraught reaction to his true origins, causes Odin to collapse, and fall into the Odin Sleep. Loki walks over and looks down at Odin in a daze, before calling in the guards to help him move Odin back to his chambers.
Loki arrives in Jottunheim via the Bifrost. He goes to Laufey's palace to make deal with the king of the Frost Giants. By now Laufey realizes that Loki was the one who let the Jotuns into Asgard but can't figure out why.
Loki explains that he had just wanted to have some fun by ruining the greatest day in his brother's life and also to make sure that Asgard would be safe from Thor's idiotic rule for a while longer. Loki offers Laufey a chance to take a few of his best warriors into asgard to kill Odin and take back the Casket of Ancient Winters to restore Jotunheim to all it's former glory. Laufey accepts his offer and allows him to leave.With Thor already banished to Earth for the attack on Jotunheim, Loki stood unopposed and assumed the role of Asgard's regent. From his position of power, he continued to manipulate others, firstly making Thor believe Odin had died, then forcing obedience from other Asgardians and finally manipulating the Jotuns into making an attempt on Odin's life.
When Thor's friends disobeyed Loki to bring word of his actions to Thor, Loki responded by sending The Destroyer after them to eliminate Thor. This action proved his undoing when Thor's courage in confronting the automaton paved the way for his return, and just as Loki revealed his double-cross against the Jotuns who were infiltrating Asgard, Thor arrived to challenge him over his actions.The resulting fight quickly moved to Heimdall's Observatory where Loki had opened a portal that would destroy Jotunheim. Thor's power ultimately overpowered Loki's cunning, at the cost of the observatory and the Bifrost.
As Loki fell into the abyss below, the spear in his hand was grabbed by Thor who in turn was anchored to the remnants of the bridge by the newly-awakened Odin. He appealed to his adoptive father that by annihilating the Jotuns he was doing what was best for Asgard. Odin sadly rejected this, and with his Asgardian life now in tatters Loki released the spear and allowed the void to claim him.
The trickster was not so easily felled however, and found his way to Earth where he began to influence the human population again. One in particular, Erik Selvig, who was summoned by S.H.I.E.L.D. to turn his scientific knowledge to the task of unlocking the secrets of a mysterious cube. Loki, as an apparition in control of the man, whispered words of encouragement to proceed.
Thor: The Dark World
Loki first appears being handcuffed by several asgardian guards,taken to Odin and having an argument with him.Loki later appears in his cell talking with his mother.