Nine-Tailed Demon Fox's Attack

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

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

However, the childbirth's location was eventually discovered by Tobi, who killed the ANBU and Biwako, and held the newborn Naruto hostage at knife point, demanding Minato to walk away from Kushina or he will kill the child. Minato tried to negotiate with Tobi, as the seal began to weaken. As Kushina pleaded with Minato to protect Naruto, Minato was able to snatch his newborn son away from Tobi, who attempted stabbing him. But to his surprise, the blanket in which Naruto was wrapped in was filled with explosive tags, forcing him to use the Flying Thunder God Technique and transport himself and Naruto away from the explosion, but also away from Kushina.

Capitalising Minato distancing from Kushina, Tobi used a technique to forcibly extract the Nine-Tails from Kushina. He hurried the extraction as he noted that the seal containing the beast also carried the Flying Thunder God technique seal, as a security measure for Minato to teleport to his wife's aid any time. As the Nine-Tails finally emerged from the seal, Tobi used his Sharingan to gain control of the beast, commanding it to destroy Konoha. Kushina, after barely surviving the extraction, particularly due to the Uzumaki's famed longevity, begged Tobi to stop. Instead, seeing no use of her any longer, Tobi directed Kurama to kill her first, but Minato arrived in time to save her. The couple soon escaped back to Minato's secret location where he set Kushina beside Naruto before heading off to protect Konoha.

Kurama's strength 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. Tobi, under the cover of night, sneaked into Konoha, and summoned Kurama into the village, who immediately started devastating the surroundings. When Hiruzen felt the familiar power and malevolence of Kurama, he immediately prepared for battle, even as the ANBU arrived to inform him of Kurama's attack. He ordered every shinobi nearby to prepare to defend the village.

Counter-Attack
Minato arrived on top of the Hokage Monument, which Kurama quickly noticed, and attacked him with the Tailed Beast Ball. Minato, using a space–time technique, teleported the blast away from the village. Before Minato could tell Hiruzen of what had happened to Kushina and her security, Tobi teleported to his location and tried to engage Minato, who used the Flying Thunder God Technique to teleport away from Konoha. Tobi followed suit, and after analysing his abilities, Minato asked if he was Madara Uchiha. Giving no definite answer, Tobi attacked Minato, both of them using their own space–time techniques to avoid capture. During the struggle, Minato carefully threw his special kunai at Tobi, which the latter allowed to phase through his head, and just as it did, Minato teleported right above his opponent, and landed a timely Rasengan on his back, severely injuring him.

A bewildered and struggling Tobi tried to escape, but Minato, having placed his Flying Thunder God Technique seal on his body as well after his attack, teleported to his location, and placed another seal onto Tobi, releasing Kurama from Tobi's control. Tobi impressively proclaimed that Minato truly deserved his title of Hokage for this feat, and teleported away, promising revenge in the future. Despite no longer being under Tobi's control, the Nine-Tails continued its rampage of Konoha. However, it was soon pushed outside of Konoha's premises by the village's shinobi. Hiruzen and other shinobi continued their attack on Kurama, trying to push it back further. During this time, a young Iruka Umino was protected from Kurama 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 Kurama, so that another generation would survive the battle and continue the Will of Fire.

Minato arrived at the village again, and was horrified at the destruction. Just as the beast was about to fire another Tailed Beast Ball at Konoha, Minato summoned Gamabunta to hold off Kurama for the moment. Minato then managed to teleport himself and Kurama away from the village, letting the blast detonate without casualties. He approached Kushina, who used her own chakra to constrain Kurama, and declared her intentions to reseal the beast within her to kill it (and inadvertently, herself) in her present state. Not willing to see his wife die, Minato devised a plan to seal the Yin half of the Nine-Tails' chakra within himself using the Dead Demon Consuming Seal, sacrificing his life in the process, and Yang half into Naruto using the Eight Trigrams Sealing Style, as it was practically impossible for him to seal all of the beast's chakra into himself. Another reason Minato did this was because he believed Tobi would be a harbinger of a great disaster in the coming future, and would plot another attack on Konoha, that Naruto would someday need Kurama's power to stop him. Minato also sealed some part of his and Kushina's chakra within their Naruto, to serve as both a final safeguard to prevent the beast from totally 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 him, Kushina, and Kurama inside of a barrier. Kushina, initially 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 with her chakra, Minato sealed away the Yin part of the Nine-Tails' chakra within himself, causing the it to decrease dramatically in size. Soon after, Minato summoned the throne needed for the Eight Trigrams Sealing Style and placed Naruto onto it. Realising that it was about to be sealed again, Kurama tried to kill Naruto. However, both Kushina and Minato stepped in front of their son to stop its claw from reaching him by having it pierce through their bodies instead, fatally wounding them. Nearing death, Minato gave Gerotora the key to the seal, Kushina expressed to an infant Naruto how she wanted him to live, to never forget who he was, and how she and Minato loved him. Minato jokingly told Naruto to listen to his talkative mother, while proceeding to seal the Nine-Tailed Demon Fox and its Yang chakra into his son.

Aftermath
Since the sealing of Kurama happened far from the Konoha, only Hiruzen Sarutobi and his two ANBU bodyguards bore witness to the sacrifices of the Minato and Kushina. Hiruzen subverted all information regarding the relationship between Naruto and Minato to protect him, giving Naruto his mother's surname. With the village having suffered heavy casualties during the attack, only a few of the villagers would forgive Naruto, who they viewed as Kurama itself, for its actions. This was despite the fact that he was the one containing the beast, preventing it from harming the village.

Because of Minato's untimely death, and having no suitable candidates at hand at the moment, Hiruzen was forced to come out of retirement to retake his position as the current Hokage, despite his age. In later years, as Hiruzen saw the cold treatment of the villagers towards Naruto, he took steps to decree that no mention of Naruto being Kurama's jinchūriki be spoken, and those who broke this rule faced harsh punishment. However, many of the villagers continued to ostracise Naruto indirectly, by transferring their harboured feelings of dislike for him onto their children, who too shunned him, resulting in Naruto living a lonely childhood with no friends.

Additionally, as the Uchiha clan's Sharingan was known to be capable of controlling Kurama, the elders of Konoha suspected them of being responsible, since majority of the village was completely unaware of noticing Tobi during the attack. According to Tobi's revelations to Sasuke Uchiha several years later, the Uchiha clan were made to move to a distant corner of the village and were constantly under surveillance. It was this suspicion and discrimination that led the Uchiha, under the leadership of Sasuke's father, to attempt a rebellion, which failed prematurely with their massacre at the hands of Itachi Uchiha. Also, during the attack, Itachi noted that his parents were noticeably absent from the nearby vicinity. Where their whereabouts were and what they were doing is currently unknown.

In the anime, it was revealed that Kurama had leaked behind large amounts of its chakra during the attack. Taking advantage of this, and desperate to obtain the Kurama's power at all costs, Kazuma collected and sealed the chakra within his own son, Sora, turning him into a pseudo-jinchūriki.

Claims
Though Kurama had attacked many settlements regularly throughout history for no apparent reason, Jiraiya and Itachi Uchiha have speculated that Madara Uchiha to be behind the attack on Konoha, citing his previous use of the beast in his legendary battle with the First Hokage, Hashirama Senju, while Minato and Kushina were personal witnesses to his involvement. But it was all revealed to be untrue, as Madara had been long dead before Kurama's attack on Konoha, and the main perpetrator was Tobi all along, who had been masquerading as Madara throughout much of his role in the series. However, Tobi has constantly lied to people (like Sasuke) of this, denying any role in the attack, and said that the beast's rampage was a "natural occurrence". However, as Minato had fought Tobi on the night of the attack, his chakra apparition warned Naruto in his subconscious to be wary of the "masked man" in Akatsuki; and Kushina's chakra apparition also confirmed the same to Naruto.