According to Madara Uchiha, the Four-Tails first came into being in the waning days of the Sage of the Six Paths’ life; to prevent the Ten-Tails’ resurgence, the Sage split up its chakra and used his Creation of All Things ( Banbutsu Sōzō) ability to create nine separate, monstrous constructs of living chakra, which would become known as the tailed beasts. The Four-Tails eventually fell into the possession of Iwagakure and was sealed into Rōshi at a young age. The beast was later captured, extracted, and sealed by the Akatsuki organization.After the events of the Fourth Shinobi World War in which Akatsuki was defeated, the Four-Tails was set free once again. The beast roamed throughout many lands and eventually found it’s way to the Land of Wind where it was later captured by Sunagakure. The beast was later sealed into Hayato when he was only three-years-old
