Madara rescued obitos body, and he asked zetsu to revive him...
after that, he used his rinnengan (human path) to mess up with his mind and make him bad...
He tould him everything about konoha, about his fight with hashirama, and when madara died, obito was so connected to him, that decided to...