The Battle of Titan was a monumental conflict that arose between the Mad Titan Thanos and members of the Avengers, Guardians of the Galaxy and Masters of the Mystic Arts that took place on the desolate planet Titan.
Tony Stark, keen on defeating Thanos, guided the Q-Ship to Titan, along with Doctor Strange and Spider-Man, where the trio encountered Star-Lord, Mantis, Drax the Destroyer and Nebula. Joining forces, the team nearly managed to subdue Thanos and remove his Infinity Gauntlet, until Star-Lord, aghast upon learning of Gamora's murder, woke Thanos from his trance. In order to spare the life of Stark, Doctor Strange relinquished the Time Stone to Thanos.
By the end of the battle, everyone except Stark and Nebula perished, as Thanos's possession of the Time Stone impacted the concurrent Battle of Wakanda and subsequently resulted in the following incident that claimed the life of half of the universe.
Having recently obtained the Power Stone from Xandar the warlord Thanos attacked the Asgardian refugee vessel Statesman, obtaining the Space Stone from Loki. Intending to personally retrieve the Reality Stone from the Collector, Thanos tasked the Black Order with obtaining the Mind and Time Stones on Earth, before bringing them to him on his homeworld, Titan. The Children split up to complete this task; Ebony Maw and Cull Obsidian head straight for the Sanctum Sanctorum in New York to retrieve the Time Stone from Doctor Strange, while Proxima Midnight and Corvus Glaive chose to hunt for the Mind Stone that is currently possessed by Vision.
During the attack on the Sanctum, Maw managed to immobilize and capture Strange and the Stone - which was protected by a magical seal conjured by Strange. Taking them back to his Q-Ship to bring to Thanos, Maw set the Ship on an automated course for Titan. However, the Ship was unknowingly boarded by Iron Man, Spider-Man, and the Cloak of Levitation, who, in a brief conflict, managed to release Strange and kill Maw, commandeering the Ship.
However, in lieu of returning the Ship to Earth, Iron Man decided to continue on their course to Titan - in a gambit to ambush Thanos directly in his own territory, where he would not be expecting an attack, and to protect Earth from further collateral damage.
Elsewhere, the Guardians of the Galaxy were on a separate quest to stop Thanos. Splitting up, Star-Lord, Mantis, Drax the Destroyer, and Thanos' adoptive daughter, Gamora attempted to ambush Thanos on Knowhere to prevent him taking the Reality Stone. However, the Guardians were themselves outwitted, resulting in the capture of Gamora, who held crucial information that Thanos required - the location of the Soul Stone. To prevent Thanos from torturing her captive sister Nebula, Gamora revealed the location of the Soul Stone to be on Vormir. However, to fulfill the price required to obtain the Stone, Thanos reluctantly sacrificed Gamora to the Stone.
Unaware of Gamora's death, the remaining Guardians, acting on a tip from the escaped Nebula, landed on Titan with the aim to ambush Thanos there. Shortly after, the Q-Ship carrying Strange, Iron Man and Spider-Man crash-landed on the barren planet. The Guardians raided the Ship and attacked the Avengers, each believing the other to be working for Thanos. However, after a tense standoff, both parties realized they shared the same goal, before deciding to work together to ambush Thanos, who they expected to be arriving soon.
Awaiting Thanos' arrival, Iron Man, Spider-Man and the Guardians attempted to formulate a plan of attack, while Strange activated the Time Stone to view all possible outcomes and futures of the coming battle. Having seen exactly 14,000,605 possible timelines, Strange gravely informed the others that only one timeline ended in Thanos' defeat. 
Striding through a portal conjured by the Space Stone, Thanos finally arrived on Titan, only to find the barren ruins of Ebony Maw's Q-Ship. The Power, Space, Reality and Soul Stone's gleaming on his Infinity Gauntlet, the warlord was instead greeted by a lone Doctor Strange, sitting on a faraway hill, carrying the Eye of Agamotto. Deducing that Maw had been killed, Thanos resignedly lamented the heavy losses he suffered, saying that his quest extracted a heavy toll but did note that his son had still accomplished his mission of bringing the Time Stone to him. Strange countered, warning Thanos that he may regret that Maw had, in the process, also brought him face-to-face with a Master of the Mystic Arts.
Choosing to remain civil with the sorcerer, Thanos ignored the threat, simply asking Strange where he believed Maw had brought him. As Thanos slowly approached, Strange calmly guessed that Titan was his former home. Nodding wistfully in affirmation to Strange, Thanos stopped, and began to reminisce. Using the Reality Stone to craft an illusion of Titan's former beauty to Strange, Thanos explained Titan's fall from grace: Once a beautiful paradise, over time, overpopulation threatened to consume the planet's finite resources and wipe out its entire civilization. Realizing that his people were faced with extinction, Thanos proposed a random, fair genocide to lower the population to safe levels, in order to save those that lived. However, the immorality of his "solution" caused his own people to cast him out, branding him a madman. Nonetheless, Thanos' predictions came to pass, and Titan became the dead, inhospitable graveyard it was now.
Sarcastically, Strange hailed Thanos as a prophet, but Thanos retorted, claiming himself instead to be a lone survivor. Strange remained skeptical, continuing to condemn the Titan's motivations as but a mass murder of trillions. Thanos, unwavering, assured Strange that his plan was necessary, asserting that with all six Infinity Stones, a single finger snap would only cause a painless and merciful cessation of existence for half of all life in the Universe.
Scoffing, Strange stood and questioned the Titan as to his intentions after completing his goal. Thanos smiled mournfully, and voiced his desire to simply retire in peace, while watching the sun rise on a grateful Universe. With resignation, the Titan noted that the hardest choices required the strongest wills. Strange countered, entering a combat stance, warning Thanos that their wills would be equal to his. At this moment, Thanos realized too late that Strange wasn't alone, and had lured the Titan into an ambush. Before he could react, he was immediately crushed underneath a massive piece of a spaceship hull, dropped on him by Iron Man.
With a few seconds of respite, the heroes began to emerge from hiding and move into their pre-planned positions, with Star-Lord warning that Thanos would only be infuriated by the initial attack. Using the Power and Reality Stones, the Titan freed himself by violently detonating the debris, before instantly transforming the rubble into an enormous swarm of bats. The swarm quickly set upon Iron Man, forcing the Avenger to flee.
However, Thanos' fury was short-lived, and he quickly found himself under a coordinated assault from all sides. Swinging out of reach, Spider-Man fired webbing into Thanos' eyes, blinding him. Leaping from behind, Drax the Destroyer emerged, slashing the Titan's legs with his knives while Doctor Strange closed in. Conjuring a sword from Eldritch Magic, Strange engaged the half-blinded Thanos in brief close combat alongside Drax, buying time for Star-Lord to fly into position. However, Thanos swiftly gained the upper hand, downing Drax with a single punch and disarming Strange, while removing the webbing that blinded him.
Nonetheless, Star-Lord quickly took position behind Thanos and began to close in, shooting him with his Quad Blasters to gain his attention. Running on energy platforms conjured by Strange to dodge blasts from the Power Stone, Star-Lord managed to discreetly plant an explosive on Thanos' back. Taking a moment to quickly insult Thanos and escape through a portal conjured by Strange, the Guardian detonated the explosive, briefly stunning the Titan.
The distraction allowed the Cloak of Levitation to swoop in, wrapping itself around the Infinity Gauntlet and preventing Thanos from activating it. Using his Sling Ring, Strange summoned Spider-Man to attack Thanos, leaping through conjured portals to repeatedly attack the Titan from all sides and preventing him from removing the Cloak. However, the assault was short-lived, as the angered Thanos grabbed and furiously pinned Spider-Man to the ground, before hurling the Avenger at Strange, knocking them both to the ground.
As Thanos forcefully ripped the Cloak from the Gauntlet unimpeded, he was bombarded by a renewed assault from Iron Man, who rained missiles down on the Titan. Unfazed, and with the Gauntlet freed, Thanos activated the Power and Space Stones. In a second, the explosive energy of Stark's missiles was absorbed by the Gauntlet and redirected at Iron Man in a concentrated beam of fire, blasting the Avenger far away into a spaceship husk. Recovered, Spider-Man swung in, attempting to pull the Gauntlet away from Thanos using a web, only to be pulled in and struck once again
Suddenly, before Thanos could react, he was rammed from behind by a Necrocraft, piloted by Nebula, who had escaped her captivity. Unfazed, Thanos coldly greeted Nebula, who angrily reproached him for not killing her. As Thanos coldly dismissed the act as being a "waste of parts", Nebula furiously attacked Thanos with her electric baton. Demanding he reveal Gamora's whereabouts, Nebula managed to briefly hold her ground against Thanos in close combat, but was quickly beaten down. However, Nebula's arrival proved to be a major turning point in favor of the heroes, buying time for the group to mobilize.
Taking advantage of the opening Nebula created, Doctor Strange quickly cast a binding spell on Thanos, restraining the Gauntlet with crimson bands of energy. Drax ran in, tackling and pinning Thanos' legs, forcing the Titan to his knees. Flying back into the field, Star-Lord launched a Gravity Mine at Thanos using his Blasters, ensnaring his right arm. As Spider-Man anchored Thanos' shoulders back using his webbing and his armor's spider-limbs, a recovered Iron Man swooped in, taking Strange's place to hold the Gauntlet. With his hands freed and Thanos barely immobilized, Strange used his Sling Ring to open a portal and drop the waiting Mantis on Thanos' head, before casting the Bands to restrain his right arm. Using her empathic powers, Mantis briefly struggled with Thanos, before managing to barely force the Titan into a subdued, trance-like state.
With Thanos barely restrained, the group began to execute the final step of their plan. As Mantis beckoned the others to hurry before Thanos broke her hold, Iron Man and Spider-Man moved to forcefully pull the Gauntlet from the Titan's hand. Flying in, Star-Lord approached and taunted the half-conscious Thanos, before demanding the location of Gamora. At this remark, Thanos began to react in anguish, with Mantis sensing that he was mourning. Nebula began to realize in horror and sadness that he was in fact, mourning Gamora - having sacrificed her for the Soul Stone.
In denial, Star-Lord angrily asked Thanos to tell him that Gamora was alive, only for Thanos to lament that he had no choice but to kill her, confirming Nebula's suspicions. Enraged, and despite Iron Man's attempts to restrain him, Star-Lord began to ruthlessly attack Thanos without thinking, inadvertently breaking Mantis' control over the Titan. Freed from his trance and now truly furious, Thanos quickly escaped his restraints, throwing Mantis and Strange away, and brutally overpowering the group.
Spider-Man moved to rescue Mantis, while Thanos instantly knocked out Star-Lord, Drax and Nebula with a single wild shockwave from the Power Stone. Rebuffing a desperate assault from Iron Man, Thanos then turned to Titan's nearby moon. Using the Power and Space Stones, Thanos immediately pulverized the moon's surface, before furiously hurling its fragments down on his opponents as a hail of meteors. Spider-Man successfully saved the unconscious Guardians from the falling fragments, but Iron Man was crushed under an oncoming meteor, briefly incapacitating him.
Thanos soon confronted a recovered Doctor Strange, who had managed to dodge the debris with the Cloak of Levitation. The two began a ferocious duel, with Strange launching the first strike, casting the Bolts of Balthakk at Thanos. Leaping into the air to avoid them, Thanos retaliated with a blast of energy from the Power Stone. Strange countered, opening a gateway to the Mirror Dimension to absorb the beam, before pushing the gateway at Thanos in a bid to trap him. Thanos responded by destroying the gateway with the Power Stone, before throwing the remnants back at Strange in the form of a destructive black hole with the Space Stone. Thinking quickly, Strange cast a spell to transmute the singularity into a swarm of blue butterflies, briefly confusing Thanos.
Taking advantage of the opening, Strange cast the Images of Ikonn, splitting into an army of magical clones of himself to restrain Thanos with hundreds of Eldritch Whips. However, Thanos immediately regained the upper hand, activating the Soul and Power Stones to instantly destroy the false Images and briefly sunder Strange's Astral Form from his body. With his opponent staggered, Thanos activated the Space and Reality Stones, pulling Strange to his hand before he could react, winning the duel. Admitting that while he was impressed by Strange's mastery over Magic, Thanos deduced that, as the sorcerer had never once attempted to use the Time Stone to his advantage, Strange had hidden the Stone, using the Eye as a decoy. Confirming his suspicions, Thanos took and crushed the Eye of Agamotto, revealing it to be empty, before tossing Strange aside.
However, before Thanos could finish Strange and look for the Time Stone, Iron Man, being the final Avenger standing, restrained the Gauntlet using a nanotech clamp, before confronting the Titan. To the Avenger's surprise, Thanos recognized and called him by his name of Stark, before noting that they were both "cursed with knowledge." Unfazed, Iron Man blamed Thanos himself as his curse, and attacked him first, blasting him with missiles. With Thanos distracted, Iron Man began attacking him relentlessly with his nanotech suit, kicking the Titan with his enhanced boosters before he could recover.
Anchoring his feet to the ground, Iron Man immediately struck Thanos again with repulsor-powered battering rams, beating him back into a wall. Recovering quickly, Thanos tore off Iron Man's helmet with his bare hand and punched him to the ground. Stark reformed his helmet just in time. With Iron Man dazed, Thanos quickly ripped the clamp from the Gauntlet, and immediately blasted the downed Avenger with a concentrated beam from the Power Stone. Barely recovering, Iron Man managed to block and sidestep the blast by forming a shield.
Boosting towards Thanos in a renewed assault, the Avenger swiftly pinned the Gauntlet to the ground using a foot clamp before twisting around and pummeling the Titan's face with a repulsor-boosted hammer, with enough force to make him bleed. Unfazed, Thanos simply taunted the Avenger, for giving so much labor and struggle only to shed a single drop of blood. He then effortlessly ripped the Gauntlet free from Iron Man's hold, flipping the Avenger onto his back. Thanos began to brutally beat the downed Avenger with his fists, breaking off more and more of his armor with each strike. With Iron Man helpless to resist, Thanos followed with a point-blank blast with the Power Stone to the Avenger's abdomen, sending him flying and heavily damaging his armor.
Desperate and missing much of the upper half of his armor, Iron Man attempted to hold off the advancing Thanos with his repulsors, relocating the nanites in his leg armor to form new arm repulsors, to no avail. Closing in, Thanos began beating the Avenger once again, destroying his helmet. Stark attempted to defend himself with his bare hands, only for Thanos to grab and trap his left hand. In a last-ditch attempt to fight back, Stark immediately shifted the nanites from his left arm to his right arm to form a sword, and wildly stabbed at the Titan. However, Thanos simply tore the sword from Stark's hand and ruthlessly stabbed him in the abdomen with it, ending the fight.
Cradling the injured Stark's head in his hand, Thanos revealed his respect for the Avenger, genuinely impressed by his fearlessness and determination. Nevertheless, he prepared to kill him, only for Doctor Strange to intervene, offering the Time Stone in exchange for Stark's life, much to Stark's surprise. Though initially skeptical, Thanos agreed after warning Strange not to double-cross him. Despite Stark's pleas to not give in, Strange revealed the Time Stone, having disguised it as a star in Titan's sky, and surrendered it to Thanos.
Taking the Stone, Thanos inserted it into the thumb slot of the Gauntlet, leaving him with only one more to collect: the Mind Stone. Suddenly, his respite was interrupted by an awakened and enraged Star-Lord, who began to wildly fire at him, but Thanos remained unfazed and activated the Space Stone and vanished through a portal. A horrified Star-Lord, realizing the gravity of the situation, asked if they had just lost the battle, while a resigned Stark, healing his wound using the last of his nanites, asked Strange why he would give up the Time Stone to Thanos. As they awaited the inevitable, Strange could only inform Stark that they were now in the endgame. 
When Thanos arrived on Wakanda, he defeated all lines of defense until he got up to Vision. Scarlet Witch then destroyed the Mind Stone, killing Vision in the process, however, Thanos, now equipped with the Time Stone, reversed time and ripped the stone out of Vision's forehead, killing him again.
With all six Infinity Stones, Thanos snapped his fingers, wiping out half of all life in the universe. Back on Titan, the injured and battered heroes were regrouping. Mantis suddenly sensed that something was happening, only to disintegrate, with Drax and Star-Lord following suit. Doctor Strange, resigned to his fate, informed Stark that this outcome was the only way, before disappearing as well. Spider-Man, sensing his impending death, tearfully pleaded with Stark that he didn't want to die, only to disintegrate in Stark's hands.
In the end, only Iron Man and Nebula were left, defeated and stranded on Titan. Nebula could only solemnly state that Thanos had finally succeeded in his goal, as Stark silently sat down and mourned the death of Parker and his allies.
In Earth, Nick Fury and Maria Hill, driving through Atlanta, witnessed the power of the Gauntlet claim the lives of the civilians around them, plunging the city into chaos. As Hill disintegrated before Fury's eyes, the former Director hurried to retrieve his last resort, an intergalactic transmitter. Realizing he was disintegrating as well, Fury managed to transmit a last-ditch distress call to a distant Captain Marvel before crumbling to dust.