Nine-Tailed Demon Fox's Attack

Twelve years before the start of the series, after the end of the Third Shinobi World War, the Nine-Tailed Demon Fox attacked Konohagakure.

Attack
The attack of the Nine-Tails coincided with Kushina Uzumaki, the second jinchūriki of the Nine-Tails, giving birth to Naruto on the night of October 10th. With the previous jinchūriki's seal almost breaking during childbirth, the village took multiple precautions; it was carried out in secret, with Biwako Sarutobi, the Third Hokage's wife, as her midwife, a few ANBU as security, and with Minato keeping the Four Symbols Seal holding the Nine-Tails secure, along with one of the most powerful and secret barriers that the village had to protect them.

The location was eventually discovered by Madara Uchiha, who then killed the ANBU and Biwako, and held the newborn Naruto hostage. While holding Naruto at knife point, Madara ordered Minato to walk away from Kushina. Minato tried to negotiate with Madara, as the seal began to weaken. Kushina pleaded with Minato to protect Naruto. It was at this moment that Madara attempted to stab Naruto. Before the knife could hit Naruto, Minato was able to snatch Naruto away from Madara. But to his surprise the blanket in which Naruto was wrapped in was filled with exploding tags, forcing him to use the Flying Thunder God Technique and transport himself and Naruto away from the explosion but also away from Kushina.

With Minato away from Kushina, Madara used a technique to extract the Nine-Tails from Kushina. He hurried the extraction as he noted that the seal holding the Nine-Tails also had carried the Flying Thunder God technique seal, so Minato would not be far behind him in trying to rescue Kushina. As the Nine-Tails emerged from the seal, Madara used his Sharingan to gain control of the Nine-Tails. Before he could set off to destroy Konoha, Kushina, barely alive from having a tailed beast extracted from her body, struggled to speak and begged Madara to stop. Madara directed the Nine-Tails to crush her but was rescued from being crushed by the large paws of the Nine-Tails by the arriving Minato. They soon escaped back to Minato's secret location where he set Kushina beside Naruto before heading off to protect the village of Konoha.

The Nine-Tails' strength at this point was so great, that even far away from the village, a young Itachi Uchiha, along with several other shinobi, were able to sense its presence. Madara, under the cover of night, sneaked into the village, and with the use of the Summoning Technique, summoned the Nine-Tails into the village without warning. Shinobi and villagers inside of Konoha were frightened as they recognized the Nine-Tails as it caused destruction and casualties instantly. When the Third Hokage felt the familiar power and malevolence of the Nine-Tails, he immediately prepared for battle, even as the ANBU arrived to inform him of the Nine-Tails' attack. He orders shinobi nearby to prepare to defend the village.

Counter-Attack
Minato arrived on top of the Hokage Monument, and the Nine-Tails quickly noticed him, and attempted to kill him using the Tailed Beast Ball. Minato, using a space–time technique, teleported the blast away from the village, causing other shinobi to be aware of his presence. Before Minato could tell the Third of what had happened to Kushina, Madara teleported to his location and attempted to use his own jutsu on Minato, with Minato barely escaping by using the Flying Thunder God Technique to teleport away from the village. Madara followed him, and after analysing his abilities, Minato asked if he was Madara Uchiha. Giving no definite answer, Madara attacked Minato, both of them using their own space–time techniques to avoid capture. During the struggle, Minato managed to land a Rasengan on Madara, after the latter allowed one of the kunai Minato threw phase through his head, giving Minato an opportunity to teleport behind him.

Madara tried to escape, only for Minato to teleport to him, having marked him during his previous strike. Minato then placed another seal onto Madara, releasing the Nine-Tails from Madara's control. Madara proclaimed that Minato truly deserved his title of Hokage, but that he would reclaim the Nine-Tails and the world would then bow to his will. Madara teleported away, and Minato teleported to the village.

Despite no longer being under Madara's control, the Nine-Tails continued its rampage of Konoha. However, it was soon pushed outside of Konoha's walls by the shinobi. The Third Hokage and other shinobi continued their attack on the Nine-Tails, trying to push it back further. During this time, a young Iruka Umino was protected from the Nine-Tails by his mother as his father tried to help repel the beast. Ignoring his father's orders to leave, Iruka stayed, determined to protect his mother, but another shinobi soon took him away from the battle. Several young shinobi were also detained from the battle (including Asuma Sarutobi and Kurenai Yūhi) between Konoha and the Nine-Tails, so that another generation would survive the battle and continue the Will of Fire.

Minato arrived at the village, and was horrified at the destruction. Just as the Nine-Tails was about to fire another blast at the village, Minato summoned Gamabunta to hold off the Nine-Tails for a moment. Minato then teleported himself and the Nine-Tails away from the village, letting the blast detonate without anyone hurt. He met up with Kushina, who then held down the Nine-Tails with her chakra. When Kushina told Minato of her plan to take the Nine-Tails to the grave with her, Minato came up with a plan of his own, knowing that the Nine-Tails, without a host, would eventually be revived and become a threat to Konoha again. In order to prevent this, Minato planned to seal the Yin half of the Nine-Tails' chakra within himself using the Dead Demon Consuming Seal, sacrificing his life in the process. Since it was impossible for him to seal all of the Nine-Tail's chakra within himself, Minato needed to use the Eight Trigrams Sealing Style to seal the Yang half into Naruto. Another reason Minato did this was because he believed Madara would be a harbinger of a great disaster in the coming future, and that Naruto would some day need the Nine-Tails' power in order to stop him. Minato also planned to sealed away a piece of his and his wife's chakra within their son. This would serve as both a final safeguard to prevent the Nine-Tails from breaking free and to assist Naruto during any future attempt to take full control of the Nine-Tails' chakra.

When Hiruzen and a few other shinobi finally caught up to Minato, they found Minato, Kushina, and the Nine-Tails inside of a barrier. Kushina, against using their son as a host, tried to reason with Minato to live and be there to raise Naruto, but Minato convinced her that his sacrifice was not only for the village's sake, but for Naruto's as well. While Kushina held down the Nine-Tails, Minato sealed away half of the Nine-Tails' chakra within himself, causing the Nine-Tails to decrease dramatically in size. Soon after, Minato summoned the throne needed for the Eight Trigrams Sealing Style and placed Naruto onto it. Realizing that it was about to be sealed again, the Nine-Tails tried to kill Naruto. Both Kushina and Minato stepped in front of Naruto to stop the claw from reaching him, having it pierce through their bodies instead. As Minato gave Gerotora the key to the seal, Kushina told Naruto how she wanted him to live, to never forget who he was, and how she loved him. Minato told Naruto to listen to his talkative mother, then proceeded to seal the Nine-Tails into his son.

Aftermath
Since the sealing of the Nine-Tails happened far from the Konoha, only the Third Hokage and his two ANBU bodyguards witnessed the sacrifice of the Fourth Hokage and Kushina as well as who Naruto was. The Third Hokage subverted all information regarding the relationship between Naruto and Minato, giving Naruto the surname of his mother. With the village having suffered heavy casualties during the attack, only a few of the villagers would forgive Naruto, who they viewed as the Nine-Tails itself, for its actions. This was despite the fact that he was the one containing the demon, preventing it from harming the village.

Because the Fourth Hokage died during the attack, and having no suitable candidates at hand, the Third Hokage was forced to retake his position despite his age. The Third Hokage saw the cold treatment of the villagers towards Naruto, so much so that he took steps to decree that no mention of Naruto being the Nine-Tails' jinchūriki be spoken. Those who broke this rule faced harsh punishment. However, many of the villagers continued to ostracize Naruto indirectly. Their feelings of dislike for Naruto would later be passed on to their children, who shunned him, resulting in Naruto living a lonely childhood.

As the Uchiha Clan's Sharingan was capable of controlling the Nine-Tails, the elders of Konoha suspected them of being responsible. According to Madara's story to Sasuke Uchiha, the Uchiha Clan were made to move to a distant corner of village and were constantly under surveillance. It was this suspicion and discrimination that led the Uchiha to attempt a rebellion, which ended with their massacre before it could happen. During the attack, Itachi noted that his parents were noticeably absent before the demon struck. Where their whereabouts were and what they were doing is currently unknown.

In the anime, it was revealed that the Nine-Tails had left behind large amounts of its chakra during the attack. Kazuma collected and sealed the chakra within his own son, Sora, turning him into a pseudo-jinchūriki.

Claims
Though the Nine-Tails had attacked many settlements regularly throughout history for no apparent reason, Jiraiya and Itachi Uchiha speculate that Madara Uchiha was behind the attack on Konoha, while Minato and Kushina were personal witnesses to his involvement. Madara denies this to Sasuke Uchiha and attributes the Nine-Tails' rampage as a natural occurrence. However, Minato had fought him on the night of the attack, and Kushina told Naruto that a "masked man" took control of the Nine-Tails.