Born to the King of the Frostgiants, Laufey, who did not want a child of such a small stature, Loki was taken from his species by Odin the king of Asgard. He was raised as an asgardian equal to Thor, his brother. Loki was a mischievous child loved playing tricks. However, as he grew older and realized that all he was promised was never to pass, Loki developed a hatred for his father and resentment of his brother. This caused years of fighting with humans and a need to rule Asgard even if he had no right to it. However, Loki as a character seems redeemable because he was able to carry the Mjolnir. He also does not want to destroy Asgard but has defended it when it was attacked by other antagonists like Suture. Loki dies multiple times throughout his history and would come back again to cause mayhem or try misguidedly to fix a wrong.
During his final reincarnation, Loki was brought back by Thor because his brother missed him. Thor did so by removing his name from the Book of Hel, which made Loki slightly impossible to kill unless he destroys himself. Thor also restored part of Loki’s identity since he restored him as a child and wanted Loki to retain some of who he is. Child Loki tried to save himself from his former self. Loki, in return, saves Thor from death and restored his hammer to ensure his brother will continue being a hero before he destroys himself. Child Loki came back after his death only to destroy himself again to change his nature from the God of Lies to the God of stories. Loki then opens a portal between worlds so he could skip to the end of the current Secret Wars.
Loki is not a villain that is considered purely evil. His bad behavior and unfortunate decision making is due to many factors. No child is born evil even if they are from a warrior species like the Frostgiants. However, the fact that Odin took him from his family and raised him with ideals that step him up to fall. He was also raised to hate his very being. This is the basis of his personality. Nurture takes a part in how someone turns out. Hence, Loki embeds bad parenting. That pushed him down the path of chaos. He is intelligent, but his plans are usually more chaotic then villainous or murderous. Hence he does try to reform, Loki is bogged down by social stigma and is unable to do so. He will always be viewed as the God of Evil or The God of Lies and Mischief.
Loki’s social issues are clear from the ideas presented. He is the creation of bad parenting, chaos, and social stigma. His famous quotes are reflective of that. “Are you impressed yet, father?” is a direct response to his knowledge that he will never be a warrior like his brother and father. He is reacting to his hatred with his need for approval. “It is a pleasure to meet you, Loki” is an important quote that shows the chaos Loki lives in. This is his reaction to meeting himself. There is no rhyme or reason to the life he’s lived and died for. The final quote is “Why do people always presume I’m lying?”. This quote is clear indication of how everyone expects Loki to act in a certain way stigmatizing him to an image that may or may not be still true about him.
He is still a villain by one standard or another but he is not what people think of as a villain. I don’t think he is a hero but I believe Loki has more to his story.