Having acquired the Power Stone, one of the six Infinity Stones, from the planet Xandar, Thanos and his lieutenants—Ebony Maw, Cull Obsidian, Proxima Midnight, and Corvus Glaive—intercept the spaceship carrying the survivors of Asgard’s recent destruction. As they extract the Space Stone from the Tesseract, Thanos subdues Thor, overpowers Hulk, and kills Loki. Thanos also kills Heimdall after he sends Hulk to Earth using the Bifröst. Thanos and his lieutenants depart, destroying the ship.
Hulk crash-lands in the Sanctum Sanctorum in New York City, reverting to the form of Bruce Banner. He warns Stephen Strange and Wong about Thanos’ plan to kill half of all life in the universe, and they recruit Tony Stark. Maw and Obsidian arrive to retrieve the Time Stone from Strange, drawing the attention of Peter Parker. Maw is unable to take the Time Stone due to an enchantment and captures Strange instead. Stark and Parker sneak aboard Maw’s spaceship while Wong stays behind to guard the Sanctum.
In Edinburgh, Midnight and Glaive ambush Wanda Maximoff and Vision in order to retrieve the Mind Stone in Vision’s forehead. Steve Rogers, Natasha Romanoff, and Sam Wilson rescue them and they take shelter with James Rhodes and Banner at Avengers Compound. Vision asks Maximoff to destroy him and the Mind Stone to keep Thanos from retrieving it, but Maximoff refuses. Rogers suggests they travel to Wakanda, which he believes has the resources to remove the Stone without killing Vision.
The Guardians of the Galaxy respond to a distress call from the Asgardian ship and rescue Thor, who surmises that Thanos is currently going after the Reality Stone, which is in the possession of the Collector on Knowhere. Rocket and Groot accompany Thor to Nidavellir, where they and Eitri create Stormbreaker, a battle-axe capable of killing Thanos. On Knowhere, Peter Quill, Gamora, Drax, and Mantis find Thanos with the Reality Stone already in his possession. Thanos kidnaps Gamora, his adopted daughter, who reveals the Soul Stone is on Vormir in order to save her captive adopted sister, Nebula, from torture. On Vormir, the Stone’s keeper, Red Skull, tells Thanos that he can only acquire it by sacrificing someone he loves. Thanos kills Gamora, earning the Stone.
Nebula escapes captivity and asks the remaining Guardians to meet her at Thanos’ destroyed homeworld, Titan. Stark and Parker kill Maw and rescue Strange. Landing on Titan, they meet Quill, Drax, and Mantis. Strange uses the Time Stone to view millions of possible futures, seeing only one in which Thanos loses. The group forms a plan to subdue Thanos and remove the Infinity Gauntlet, which he uses to house the Stones. Thanos appears and justifies his plans as necessary to ensure the survival of a universe threatened by overpopulation. Nebula arrives soon after, and helps the others subdue Thanos until she deduces that Thanos has killed Gamora. Enraged, Quill attacks Thanos, inadvertently allowing him to break the group’s hold and overpower them. Thanos grievously wounds Stark, but spares him after Strange surrenders the Time Stone to him.
In Wakanda, Rogers reunites with Bucky Barnes before Thanos’ army invades. The Avengers, alongside T’Challa and the Wakandan forces, mount a defense while Shuri works to extract the Mind Stone from Vision. Hulk refuses to fight after losing to Thanos, so Banner fights in Stark’s Hulkbuster armor. Thor, Rocket, and Groot arrive to reinforce the Avengers. Midnight, Obsidian, and Glaive are killed and their army is routed, but Shuri is unable to complete the extraction before Thanos arrives. Maximoff destroys the Mind Stone and Vision, but Thanos uses the Time Stone to reverse her actions and rips the repaired Mind Stone from Vision’s forehead, killing him. Thor severely wounds Thanos with Stormbreaker, but Thanos activates the completed Gauntlet by snapping his fingers before teleporting away.
Half of all life across the universe disintegrates, including Barnes, T’Challa, Groot, Maximoff, Wilson, Mantis, Drax, Quill, Strange, and Parker, as well as Maria Hill and Nick Fury, although Fury is able to transmit an emergency signal on a modified pager. Stark and Nebula remain on Titan while Banner, M’Baku, Okoye, Rhodes, Rocket, Rogers, Romanoff, and Thor are left on the Wakandan battlefield. Meanwhile, Thanos watches a sunrise on a peaceful planet.