Eye of the Moon Plan

The is Madara Uchiha's ultimate plan to create an idealistic world, which was later adopted by Obito Uchiha. With the Allied Shinobi Forces seeing this as nothing more than robbing humanity of their free will, they intend to foil this plan. This led to the declaration of the Fourth Shinobi World War.

The Plan
Madara created the plan by studying his distant ancestor, the Sage of the Six Paths. He resolved to gather the nine tailed beasts and merge them with the Demonic Statue of the Outer Path in order to revive the Ten-Tails. Then, he would become its jinchūriki and use its power to reflect his Mangekyō Sharingan on to the moon, which had previously served as a container for the Ten-Tails' body, and shroud the world in an. This scheme would result in Madara's ability to manipulate every living creature, ceasing all conflict by purging free will itself from the world.

Due to his poor health and old age, Madara could no longer work on the plan at some point, and left its completion and his will to Obito Uchiha. Obito would then join and take control of the Akatsuki after Yahiko's death, though most of its members were unaware of the organisation's true objectives. Posing as Madara, Obito ensured that Nagato, the figurehead of Akatsuki, would revive Madara with the Outer Path: Samsara of Heavenly Life Technique when the plan finally came to fruition at the cost of the latter's life. Nagato believed they were collecting the tailed beasts to create a powerful weapon that would utilise mutual destruction to ensure peace. Obito's personal ambition for the Eye of the Moon Plan is to remove the agency of all living creatures and create a reality without war or suffering. He had also approached Kisame Hoshigaki, requesting his participation in the cabal with the offer of liberating him from the "world of lies"; Kisame, having lived a life tainted with duplicity and betrayal, gladly accepted to abide in the "world of truth" he desired, and along with Obito and Zetsu, became one of the only Akatsuki members to know the truth of the organisation's agenda.

Progress of the Plan
Though Obito obtained seven of the nine tailed beasts, only the final two tailed beasts: the Eight and Nine-Tails, remained out of his grasp. After Nagato's death ruined any chance of Madara's resurrection and Sasuke Uchiha's failed attempt to capture Killer B provided him with a fragment of the Eight-Tails' power. Obito decides to take Madara's place in the Eye of the Moon Plan. Discarding all caution and revealing himself, Obito arranged to place Sasuke and his team at the Kage Summit in hopes the ninja leaders would be weakened enough to be easily taken hostage to negotiate their freedom in exchange for the last two living jinchūriki, Killer B and Naruto Uzumaki. This, however, ended in failure, due to Danzō Shimura escaping during the chaos while combined forces of the Kage, their bodyguards, and Mifune overwhelmed Sasuke. Sending Sasuke into the other dimension with Karin, Obito introduces himself as Madara while revealing this plan to the four Kage. However, they refuse to hand over Killer B and Naruto while creating the federation of the Allied Shinobi Forces to prevent Obito from achieving his Eye of the Moon Plan.

At the end of the first day of the Fourth Shinobi World War, Obito stole the Kohaku no Jōhei and Benihisago that each contained one of the Gold and Silver Brothers, and having already fed the Eight-Tails' tentacle to the Demonic Statue, intended to put the plan into motion by the end of the following day. Madara's resurrection through Kabuto Yakushi's Impure World Reincarnation disrupted Obito's deception, and when engaging Naruto his mask was shattered, revealing his true identity. Obito fed the Kohaku no Jōhei and Benihisago to the Demonic Statue in order to revive an incomplete Ten-Tails, claiming that the monster would still have enough power to be sufficient in completing his plan. Once joined by Madara after he defeated the Kage, Obito is berated for deviating from the original machination due to the Ten-Tails' revival being incomplete and his own revival through a different method. Regardless, entrusting Obito to make sure no one interferes as he battles Naruto and Killer B, Madara decides to capture the Eight and Nine-Tails personally to complete the plan while there is still time. Though Naruto and Killer B made an attempt to destroy the Demonic Statue with a giant Tailed Beast Ball, they were unable to stop the Ten-Tails' revival.

Though he attempts to control the Ten-Tails by having himself and Obito use Hashirama's DNA, Madara notes that the monster is beginning to resist control. Because he was revived by Impure World Reincarnation, Madara is only a reanimated corpse and cannot become the Ten-Tails' jinchūriki, which would require him to be brought back as a living body with Samsara of Heavenly Life Technique that only Obito, having obtained his master's Rinnegan, could now execute. However, using that fact as leverage since using the technique would kill him, Obito persuades Madara into letting him use the Ten-Tails to instil despair on Naruto and the entire Allied Shinobi Forces. Surprisingly the act only had the opposite effect as Naruto and his comrades manage to sever the means that the Uchiha used to control the Ten-Tails. With Obito getting teleported into the other dimension with his former compatriot, Kakashi Hatake, the Ten-Tails is rendered impossible as the uncontrolled colossus begins to rampage on the battlefield.

In the other dimension, the two battled until Kakashi drove his hand through Obito and inflicted a hole in his chest. Defeated, Obito returned to the battlefield and dropped to the ground a short distance from Madara. Deeming that he no longer had any need for Obito and though lamenting that he had wanted to battle a reincarnated Hashirama Senju before becoming the Ten-Tails' jinchūruki, Madara callously activating the chakra receivers inside Obito's body intent on now reviving himself. This action causes Obito's right half to turn black and forces him to form the hands signs for the Samsara of Heavenly Life Technique.

Trivia

 * Obito has blamed Naruto for the plan's slow progress, due to his constant interference causing him to deviate from the plan as Madara envisioned.
 * Obito noted that he had thought of synchronising Sasuke Uchiha with the statue. However, Obito had likely dropped this idea due to how Madara was reincarnated already by Kabuto.