In the 27th year of Konoha, Uchiha Madara transplanted the Samsara Eye to Nagato, handed over the follow-up plan to Black Zetsu and then fell into a deep sleep, while Black Zetsu started his own plan. With the help of the heretic demon and the genes of Kaguya Otsutsuki's descendants, he planned to reappear Kaguya, but the world was impermanent, and was noticed by the Sage of Six Paths. The Sage of Six Paths made a deal with Kaiyuan Blue Star Tiandao to allow the soul of a dying person to travel through the ninja world.