He merely took on the name after the real Madara died, giving Madara's Rinnegan eyes to Nagato (somehow) and controlling
Akatsuki from the shadows, not knowing that he himself (and even Madara himself) was being manipulated by Black Zetsu,
who is a spawn of Kaguya.