Warning: major spoilers follow for Avengers: Endgame.
Half the universe died in Avengers: Infinity War with a simple snap from Thanos's fingers. But it's hard to believe that 50 percent of Marvel's superheroes would really stay gone — the MCU couldn't possibly let characters like T'Challa and Peter Parker remain dusted after how popular they'd become. Still, certain deaths looked irreversible, especially that of Thor's trickster brother Loki, who died not too long into Infinity War. But after some sneaky time-traveling shenanigans in Avengers: Endgame, we're not so sure that he's truly dead anymore.
Let's backtrack to the events of Infinity War. Picking up from Thor: Ragnarok, the movie opens with Thanos confronting Loki, Thor, and the Asgardians. We know that Loki took with him the Tesseract, which contains the Space Stone. After grabbing the Infinity Stone, Thanos kills Loki. This provides Thor with the motive to avenge his brother's death throughout the third Avengers installation.
We see Loki again in Endgame, but it's kind of complicated. Basically, the Avengers travel back to different points in time to take the Infinity Stones so that they can undo Thanos's snap. Cap, Iron Man, Hulk, and Ant-Man go back to New York City in 2012 (so to the events of the first Avengers movie). Hulk gets the Time Stone and Cap picks up the Mind Stone, but Iron Man's plan to take the Space Stone doesn't quite go so smoothly. Hoping to create a diversion, Iron Man tells Ant-Man to disable the Arc Reactor on his younger self's chest. But this results in Loki, who's just about to be taken into custody, stealing the Tesseract and transporting himself to who knows where.
Cap and Iron Man go back to the '70s to acquire more Pym particles and the Tesseract, but the implications for Loki's fate remain open-ended. Eventually, Cap returns the Stones (and finally gets his dance with Peggy). Since he grabbed the Tesseract from the '70s, he probably didn't stop Loki in 2012.
We doubt Marvel forgot about Loki, though. In an alternate timeline, Loki could be out and about wreaking havoc on the world with the cube. This looks like the perfect setup for his upcoming Disney+ show, in which we'll see him influence historical events. We'll just have to wait and see how the trickster god's timeline unfolds in the new series.