Avengers: Endgame is almost here. And while plenty of the many, many people who are going to see it followed along with all the Avengers-related Marvel movies that came before it, there are also comics that could hint at what Avengers: Endgame will feature.
The movies in the Marvel Cinematic Universe tend to combine parts of various comics that have come out over the years, taking storylines, villains, and relationships between the heroes from different issues. When it comes to last year's Avengers: Infinity War, the plot was inspired by the 1991 comic miniseries, Infinity Gauntlet, as noted by Polygon. But, the site explains that while Infinity War ends with Thanos collecting all of the infinity stones in the gauntlet and using it to immediately kill half of all life in the universe, the Infinity Gauntlet comics begin with Thanos having all the stones and making his big, murderous snap. For this reason, it's only natural to look at what goes on to happen in Infinity Gauntlet for clues about Endgame.
Polygon explains that in the rest of the story, Thanos triumphs over some supreme beings, "decides to transform himself into an astral entity and leave his corporeal form behind," and forgets that he needs to be in his corporeal form in order to actually wear the gauntlet that provides him with all this power. (Astral entities don't tend to have hands, I guess.) Taking advantage of this mistake, Nebula takes the gauntlet, and both the remaining Avengers and Thanos try to retrieve it from her. Nebula then ends up being the one to reverse all of the killing Thanos did in order to spite him.
While the movie will surely pull inspiration from the Infinity Gauntlet, it's unlikely it will stick to this plot. For one thing, the story needs to surprise any viewers who now know how Infinity War is related to Infinity Gauntlet, but on top of that, this story has more of a focus on Nebula and Thanos than the original Avengers, and they're the ones fans care more about and who are getting a sendoff in this final movie.
In addition to the Infinity Gauntlet arc, there are many other comics in which Thanos appears. Den of Geek took a look at the ones in which Thanos lost a fight, since perhaps these could be options for the strategy by which he is defeated in Endgame. For instance, in Thanos War from 1974, Captain Marvel destroyed the Cosmic Cube, which provided Thanos' powers, and thus defeated Thanos. There are many others, but the site notes that the movie is still most likely to pull from Infinity Gauntlet while switching some things up. One change will probably be how much Carol Danvers/Captain Marvel is involved in Thanos' defeat since she's expected to play a major role in the film.
Polygon also took a look through the plots of some other related comics: ones that have the word "endgame" in the title. And there are a lot. Most of them just have to do with the fact that it was the end of a series. As the site notes, "Writers like to use 'endgame' to mean the end of a story, and the beginning of a new one. And that’s exactly what Avengers: Endgame looks like it’s going to be."
Avengers: Endgame is the end of one phrase of the Marvel Cinematic Universe, with more movies to come after and some fan favorite actors leaving as their contracts run out. It's totally up in the air how the whole thing will end — which is just how the producers want it — but it will be interesting to see which comics this particular endgame matches up with.