The film begins with the Asgardian refugee ship being attacked by Thanos, the Mad Titan, who is on a mission to collect all six Infinity Stones. He already possesses the Power Stone, having decimated Xandar. On the ship, Thor, Loki, and Hulk try to stop him, but Thanos easily overpowers them, even crushing the Tesseract to claim the Space Stone. Heimdall uses the last of his power to send Hulk back to Earth before being killed. Thanos then murders Loki and destroys the ship, leaving Thor drifting in space. Meanwhile, Hulk crashes into the Sanctum Sanctorum in New York, warning Doctor Strange and Wong about Thanos. They summon Tony Stark, and soon after, Thanosโ minions, Ebony Maw and Cull Obsidian, arrive to take the Time Stone from Strange. A battle ensues, with Spider-Man joining in, but Maw ultimately captures Strange and takes him aboard his ship. Stark and Parker secretly follow, while Wong stays behind to protect the Sanctum.
Meanwhile, in Scotland, Vision and Wanda Maximoff are attacked by Proxima Midnight and Corvus Glaive, who seek to take the Mind Stone from Visionโs forehead. Steve Rogers, Natasha Romanoff, and Sam Wilson arrive just in time to rescue them. They return to the Avengers facility, where they reunite with James Rhodes and Bruce Banner. Realizing that removing the Mind Stone from Vision could prevent Thanos from using it, they travel to Wakanda, where Shuri begins the process of extracting the stone. Elsewhere, Thor is rescued by the Guardians of the Galaxy and informs them of Thanosโ plan. He, Rocket, and Groot travel to Nidavellir to forge a new weapon capable of killing Thanos, while Peter Quill, Gamora, Drax, and Mantis go to Knowhere to stop him from obtaining the Reality Stone. However, they arrive too late, as Thanos already has it. He captures Gamora, forcing her to reveal the location of the Soul Stone by torturing Nebula. On Vormir, Thanos learns he must sacrifice someone he loves to obtain the stone. With great anguish, he throws Gamora off the cliff, gaining the Soul Stone in the process.
On Titan, Stark and Parker rescue Strange from Ebony Maw, killing the villain in the process. They crash-land on the planet, where they encounter the remaining Guardians of the Galaxy. Realizing they have a common enemy, they devise a plan to ambush Thanos when he arrives. The battle is fierce, and they nearly remove the Infinity Gauntlet from Thanosโ hand, but Quill, enraged over Gamoraโs death, disrupts the plan, allowing Thanos to regain control. Strange sees only one possible future where they win and willingly gives up the Time Stone to Thanos to ensure that outcome. Meanwhile, on Wakanda, the Avengers prepare for battle as Thanosโ army invades. Despite their efforts, the Outriders overwhelm them. Thor arrives with Stormbreaker, turning the tide of the battle. However, as Shuri attempts to remove the Mind Stone, Corvus Glaive infiltrates the lab, forcing Vision and Wanda to take action. Wanda ultimately destroys the Mind Stone, killing Vision in the process, but Thanos arrives moments later, using the Time Stone to reverse time and revive Vision. He then rips the stone from Visionโs head, completing the Infinity Gauntlet.
With all six stones in his possession, Thanos prepares to snap his fingers, but Thor drives Stormbreaker into his chest. However, it is too lateโThanos utters, โYou should have gone for the head,โ and snaps his fingers. The universe is thrown into chaos as half of all life disintegrates into dust. On Earth, TโChalla, Sam, Bucky, and Wanda vanish, while on Titan, Quill, Drax, Mantis, and even Spider-Man fade away, leaving Stark devastated. Strange, before disappearing, tells Tony, โIt was the only way.โ Back on Earth, Steve Rogers, Natasha, Bruce, and the remaining Avengers stand in stunned silence as the battlefield falls into eerie stillness. Thanos, wounded but victorious, retreats to a distant planet, watching the sunrise with a satisfied smile.
The film ends on a somber note, leaving the fate of the universe in uncertainty. A post-credits scene shows Nick Fury and Maria Hill vanishing, but not before Fury manages to send a distress signal to Captain Marvel. With half of all heroes gone, the Avengers are left broken and hopeless, setting the stage for the ultimate battle in Avengers: Endgame.