The beginning of the Fourth Great Shinobi World War|第四次忍界大戦|Daiyonji Ninkai Taisen was declared by Madara Uchiha when the five Kage refused to give him the Eight-Tailed Giant Ox and the Nine-Tailed Demon Fox for his Moon's Eye Plan. Madara has stated that he will use the seven tailed beasts already captured by the Akatsuki in combating the ninja world. The Fifth Kazekage, the Fifth Mizukage, the Fourth Raikage, the Third Tsuchikage, and head of the Samurai, Mifune have agreed to form a Shinobi Alliance, pooling their resources against Madara. Sometime after that, the Sixth Hokage joined as well, having been recently made Hokage after the death of the Fifth Hokage, who died while in a coma from the battle with Pain, and the death of Danzo to Sasuke Uchiha.
At some point during the war, Madara Uchiha was losing, so he made all Seven of the Tailed Beasts he had, go inside himself, turning himself into a Jinchuriki. Madara was ultimate killed, leading to all the Tailed Beasts except for the Eight Tails and Nine Tails, to be destroyed.