Thanos, the Mad Titan portrayed by Josh Brolin is a fantastic character. Marvel fans and critics alike want to see more of him in the MCU. But he dies in Avengers: Endgame. He kills himself.
Thanos leaves loose ends to come bite him later

In Avengers Infinity War, we see Thanos a bit more than relaxed. He holds back while fighting against the likes of Iron Man, Doctor Strange and even Thor. Starting off from the beginning of the movie, Thanos knows all along where to find the Infinity Stones. The first place he chooses to go to? To fight Thor, he angers him by killing much of Asgard. Thanos then proceeds to kill his only family, Loki and his best friend, Heimdall. He leaves Thor alive, though he is well aware of Thor’s capabilities.
Despite Thor’s initial warning, “ You will die for that!”, Thanos just ups and leaves him tied up. It is worth noting that later on, Thanos explicitly tells Thor, “You should have gone for the head.” This line is perhaps the biggest clue to prove that Thanos wants to die.
The mad titan holds back against Avengers
Thanos’ next step is to send his henchmen to the planet Earth for collecting the next stone. The Mad Titan takes all his pleasurable time in collecting the stones. Josh Brolin’s amazing portrayal of Thanos and his expressions is close to perfect. In the next sequence, Thanos has to fight Iron Man (aka Tony Stark aka Robert Downey Jr.), Doctor Strange (played by Benedict Cumberbatch) and Guardians of the Galaxy in a combined offensive. He underestimates the team when he fights them on his dead and desolate home planet, taking his time to best the team.
Seemingly so, Thanos holds back in every fight, hoping to court mistress Death.
Thanos’ fight against Doctor Strange is the only time he even tries to defend himself and use some of his abilities. He knew full well that Doctor Strange is the Sorcerer Supreme. The Mad Titan could have killed him despite of this fact as he is in possession of the Power Stone and the Reality Stone.
Robert Downey Jr. aka Iron Man uses all the power of his nano suit against him, all in vain. He barely got a drop of blood out of the man. It seems that Thanos allows Iron Man to use all his strength against him. Thanos wants to kill himself. If he wished to, Thanos could easily decimate Stark into pieces.
Even when he comes for the next stones, Thanos, in a last attempt to kill himself, does not use all of his strength against all the heroes trying to kill him. Only when it is absolutely necessary does Thanos make little use of the Infinity Stones.
Thanos courts death by killing himself
Thanos finally collects all of the stones but right before he can make the snap, Thor attacks him. We see in Avengers: Endgame that Thanos destroys all of the Infinity Stones, he feels he has failed. Even destroying the Infinity Stones is not enough harm to kill the Mad Titan. What Thanos feels he has failed at is in courting death. The fact that the Titan Eternal is alive despite wielding all the Infinity Stones and when using them twice does not kill him, makes him realise that what he has done is not enough.
He waits for death to come to him through the strike of Thor’s Storm breaker. His last line? “I am inevitable.”
This is the same line that Thanos speaks before the second time he dies. The Deviant Eternal comes back despite having seen the death of the future version of himself. He comes striking with full force. He does not care about the fact that he doesn’t possess any of the Infinity Stones yet nor does he care if he is to end up dead.
Thanos only wishes to achieve one goal this time around. To use the Infinity Stones for the ultimate destruction of the Universe and build it anew. This sounds like he is trying to impress mistress death with the ultimate gift. Though he ends up dead, he firmly believes that he is inevitable and this may hold true yet again. And the fact that he is inevitable may be the reason he is unable to court Mistress Death, though he wants to try. He wishes to try to get to her and when he sees no way to win, he accepts death.
He is rather happy about it too. It is his ultimate sacrifice for the Universe – his gift to lady death.
