Let me carefully explain this to you.
Madara Uchiha, programmed his Sharingan to cast Izanagi in order to save himself from death if he was to lose to Hashirama. After his presumed death, Tobirama sealed away his body and left it for research later. However, after the Izanagi was cast, Madara came back to life and placed a Kage Bushin (clone) in the coffin in place of his presumed dead body. That is why the Manga says that he replaced his corpse. (The clone took the place of Madara's corpse from when Madara was dead.)
Glad I read the whole thing or I would have just repeated what he wrote.
This.