Board Thread:Theories and Speculation/@comment-28136690-20160523202406/@comment-26773508-20160524160557

Nope. Madara left Konoha after the Hidden Stone came into existence, at the very least. Remember when Madara thrashed Muu and Onoki? Yep, Madara was a Konoha shinobi then. And Muu and Onoki were on a diplomatic mission on behalf of Otogakure.

Also, what @Thekillman said.