Well maybe when he kill shodaime he
gained the magekyo after all they were good friends... they are Konoha's "father's"
where does it say that madara killed shodaime. jiraiya said that uchiha madara was killed in the VOTE. but we know he's still alive and his powers are sealed so chances are the first survived their battle.