Black Zetsu back-stabbed Madara Uchiha in the 4th War to revive Kaguya Otsutsuki. Ultimately, Madara Uchiha died after the conclusion of the war when he was drained of all the strength having all the tailed beasts extracted from him.