The Alternate Universe Loki, who escaped with the Tesseract after the Battle of New York, gets arrested, then forcibly recruited, by the Time Variance Authority, an organization that exists outside of the flow of time and is dedicated to preserving the Sacred Timeline, to help them stop another version of himself that's been antagonizing and massacring their agents, who could potentially threaten reality itself if left unchecked.