Having acquired the Power Stone 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 destruction. As they extract the Space Stone from the Tesseract, Thanos subdues Thor, overpowers Hulk, and kills Loki. Heimdall sends Hulk to Earth using the Bifröst before being killed. Thanos departs with his lieutenants and obliterates the spaceship.
Hulk crash-lands at the Sanctum Sanctorum in New York City, reverting to Bruce Banner. He warns Stephen Strange and Wong about Thanos' plan to kill half of all life in the universe; in response, Strange recruits Tony Stark. Maw and Obsidian arrive to retrieve the Time Stone from Strange, drawing the attention of Peter Parker. Maw captures Strange, but fails to take the Time Stone due to an enchantment. Stark and Parker pursue Maw's spaceship, Banner contacts Steve Rogers, and Wong stays behind to guard the Sanctum.
In Scotland, Midnight and Glaive ambush Wanda Maximoff and Vision in order to retrieve the Mind Stone in Vision's forehead. Rogers, Natasha Romanoff, and Sam Wilson rescue them and take shelter with James Rhodes and Banner at the Avengers Compound. Vision offers to sacrifice himself by having Maximoff destroy the Mind Stone to keep Thanos from retrieving it. Rogers suggests they travel to Wakanda, which he believes has the resources to remove the stone without destroying Vision.
The Guardians of the Galaxy respond to a distress call from the Asgardian ship and rescue Thor, who surmises Thanos seeks 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 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 adoptive daughter, who reveals the location of the Soul Stone to save her captive adoptive sister Nebula from torture. Thanos and Gamora travel to Vormir, where Red Skull, keeper of the Soul Stone, informs him the stone can only be retrieved by sacrificing someone he loves. Thanos reluctantly kills Gamora, earning the stone.
Nebula escapes captivity and asks the remaining Guardians to meet her on Thanos' destroyed homeworld, Titan. Stark and Parker kill Maw and rescue Strange. Landing on Titan, they meet Quill, Drax, and Mantis. The group forms a plan to remove Thanos' Infinity Gauntlet after Strange uses the Time Stone to view millions of possible futures, seeing only one in which Thanos loses. Thanos arrives, justifying his plans as necessary to ensure the survival of a universe threatened by overpopulation. The group subdues him until Nebula deduces that Thanos has killed Gamora. Enraged, Quill attacks him, allowing Thanos to break the group's hold and overpower them. Stark is seriously wounded by Thanos, but is spared after Strange surrenders the Time Stone to Thanos.
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. Banner, unable to transform into the Hulk, 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. Thanos arrives and despite Maximoff's attempt to destroy the Mind Stone, removes it from Vision, killing him.
Thor severely wounds Thanos, but Thanos activates the completed Infinity Gauntlet and teleports away. Half of all life across the universe disintegrates, including Barnes, T'Challa, Groot, Maximoff, Wilson, Mantis, Drax, Quill, Strange, and Parker. 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 recovers on another planet.
In a post-credits scene, Nick Fury transmits a signal as he, Maria Hill, and others disintegrate. The transmitter displays a starburst insignia on a red-and-blue background