How Does Infinity War End in the Comics
How it all started...
The Infinity War plot is based on the Infinity Gauntlet six issue miniseries written in 1991 by Jim Starlin. It is important to note that in the movie verse, significant changes were made to the original storyline.
Infinity Gauntlet opens with Thanos already in possession of the six Infinity Gems. In fact, in the very first issue of the series, the purple Titan disintegrates half of the Universe. (Sounds familiar?)
Rise of Thanos
The next big difference between the comic and the movie verse are the motivations of our favorite purple villain. There is a long story behind this, but you only need to know that in the comics, Thanos does very nefarious things to impress the Death.
In the original story, Thanos also destroys several of the Avengers and X-men with extremely cruel methods. And yes, it is way worse than the movie.
The breaking point: Nebula
In the midst of all the death, we will focus on Nebula. In Infinity War we saw Nebula being tortured and torn apart. Her storyline concludes in Titan, when she takes part in the final stand off against Thanos. We see her next to Iron Man as heroes began to disintegrate.
In the comics, however, the granddaughter (in the movies she is the daughter) of the Mad Titan is the key to his downfall. Thanos traps Nebula in a painful hell without allowing her to die. Thanos then proceeds to do more horrible things around the galaxy until he decides to transform himself into an astral being without physical form.
This proves to be a mistake, since Nebula, who has endured her torture in silence until that point, uses this transformation to snatch for herself the gauntlet. Yeah, pretty simple, right? Well, it turns out that getting the gauntlet off Thanos is only the beginning of chaos.
Nebula uses the gauntlet that she stole from Thanos physical body to restore her own body to full health. Then she sends her adoptive grandfather/father into a deserted corner of the space.
Meanwhile, the remaining heroes form a team to recover the gauntlet. This elite force includes some characters that we haven't seen in Marvel's cinematic universe (yet), like Adam Warlock. Thanos also comes back from literally nowhere to confront Nebula.
The Soul Stone, the key to the end
In this battle, Nebula decides to use the power of the gauntlet to set back the clock 24 hours, which brings back every hero killed off by Thanos. Sadly for Nebula, this also means she turns back into a decaying monster. Fighting promptly ensues and Nebula looses possession of the gauntlet.
Then it all comes down to an unknown character for people who have never read the comics. Adam Warlock, a superhero (kind of) with powers tied to the Soul Gem, participates in the final battle for the gauntlet. While everybody fights, Adam jumps into the Sould Stone/Gem Realm (remember the place where Thanos talked with little Gamora in Infinity War?)
Then Adam uses his connection to the Gem to create discord among the other stones. This results in Nebula suffering unberable pain and taking the gauntlet off.
Adam takes the gauntlet, Thanos escapes and Nebula gets a trial for her past crimes.
But that is not the end. Warlock uses his powers to find Thanos in the future, where our favorite villain has turned into a farmer. Believe it of not, Thanos decides to live the rest of his life as a regular field worker.
Meanwhile, Warlock realizes even him can't be trusted with the full power of the gauntlet. To prevent anyone else from owning such massive responsibility slash risk, he spreads out the stones and entrusts them in multiple individuals' hands.