Nagato (長門), better known as Pain (ペイン, Pein), was the recognized leader of Akatsuki and Amegakure and was a major antagonist in the series. Referred to as "Leader" by all Akatsuki members, except for Konan (who referred to him by his name) he directed the actions of the rest of the members and maintained authority over them. However, he took orders from Tobi, who was actually Madara Uchiha, the benefactor of Akatsuki.

During one of the great shinobi wars in Amegakure, two Konoha shinobi broke into Nagato's house looking for food, thinking that the house had been abandoned. His parents, believing they were going to be killed, attacked the two strangers so Nagato could escape. Thinking that they were enemy ninja, the Konoha shinobi killed Nagato's parents, prompting Nagato to awaken his Rinnegan and dispose of the intruders. He would come to consider this incident the first great pain of his life. Having no-one left to call family, Nagato left his home after burying his parents, and began wandering aimlessly with nothing but a few supplies, along with meeting and befriending a stray dog, which he named 'Chibi'. He later grouped up with fellow orphans, Konan and Yahiko, and they looked after each other. One day, the three friends got caught in the crossfire of a battle between the Legendary Sannin and Hanzō, resulting in Chibi dying in Nagato's arms. This infuriated Yahiko, to the point of declaring that he would become a god to stop all madness, which eventually became Nagato's desire. After the Great War ended, Nagato and his friends met the Sannin, who at first were less than willing to help them. Orochimaru even suggested to kill them, as they were orphans of war, and as such would only live their lives full of misery. Jiraiya, on the other hand, decided that he would take care of them, to compensate for what the Sannin did. One night, at dinner, Nagato cried because eating together with his master and friends reminded him of his family. Later that night, he ran away with Yahiko. The two were attacked by an Iwagakure chunin, who injured Yahiko. To his horror, Nagato activated his Rinnegan, and killed the ninja. When Jiraiya found out about this, he decided to train them in ninjutsu. Nagato was very emotional about killing the ninja, and asked Jiraiya for help so he could protect Konan and Yahiko. Jiraiya's response was for Nagato to grow up. He also revealed the truth behind Nagato's Rinnegan: that his eyes might be the key to finding the peace they both desired for the world. After three years, Jiraiya felt they were strong enough to fend for themselves, so he began to head home. Jiraiya believed Nagato to have later died with the other orphans under unexplained circumstances, but had told Konan that, whenever their names were mentioned outside their village, it was always about someone being killed when they opposed them. In truth, Nagato, Konan, and Yahiko began a quest to find the peace that they desired, just as Jiraiya had done. While becoming full-fledged Rain ninja, they followed their own path, and began gathering several supporters, with Yahiko as their leader. Unfortunately, then Amegakure leader, Hanzō, viewed Yahiko's gang as a threat to his position as leader and schemed with Danzo and Konoha's Foundation to eliminate them. Luring Yahiko's group into a trap under the guise of three-way peace talks with the Land of Fire, Land of Wind, and Land of Earth, Hanzō took Konan hostage, and used her life as a bargaining chip to try and force Nagato to kill Yahiko. Faced with a horrible decision, and with both Konan and Yahiko showing their willingness to die for the sake of the other, Nagato struggled with himself, until Yahiko physically forced Nagato to kill him by placing the kunai in his hand and guiding it. With Yahiko's dying breath, he told Nagato to survive, because he believed in Jiraiya's words that Nagato would become the world's saviour. This would become the second great pain of Nagato's life. After Yahiko's death, Hanzō ordered his shinobi to kill Nagato as well, but Nagato managed to unleash his Shinra Tensei to repel their kunai. As Nagato rescued Konan, Hanzō captured him with exploding tags, severely burning his legs and hands in the resulting explosion. However, Nagato continued to hold his ground, and returned Konan to safety, telling her to take hold of Yahiko's body. Nagato then performed Summoning: Demonic Statue of the Outer Path, despite Konan's pleas, and used the Illusionary Dragon Nine Consuming Seal statue to decimate both Hanzō and Danzo's forces. The technique didn't kill Hanzō and Danzo, as they were able to flee. However, it left Nagato emaciated, with numerous chakra rods embedded in his back, which, along with the injuries from the explosion, seemed to necessitate his future use of a robotic transport. Leadership of the gang passed on to Nagato as he scratched through the symbol of his Amegakure forehead protector, presumably indicating both the origin of the rebellion that would lead to civil war, and the beginning of his teaching of enlightenment through pain. Upon adopting the alias "Pain", Nagato led the rebelling forces in the Amegakure civil war, and took control of the village by assassinating Hanzō, then solidified his leadership by systematically killing anyone who had direct ties to the former leader. Pain and his faction then wore their forehead protectors with scratches through them (a practice shared by the members of Akatsuki), to symbolize their rebellion, and continued to wear them even after gaining control of the country, despite no longer being labeled as missing-nin, to symbolize their victory in the conflict.

Nagato was a sensitive but kind boy, prone to crying, and was traumatized by the idea he had killed another man, even to save his friend Yahiko. Scared and unsure of his place in the world, he desired to help those he cared about, but never knew how. Nevertheless, he was a talented and gifted student, mastering every technique Jiraiya had taught him. As Pain, his personality was very different, having become a calm, serious, aloof, and detached man. Apparently believing traumas he experienced in his youth had enlightened him to the true meaning of pain and suffering, he considered himself a deity, and believed he had evolved beyond a mere human being. He sought to show the world the meaning of pain by using an ultimate weapon to deter future wars, by means similar to "mutually assured destruction", and showed no moral qualms about his actions. He was also willing to kill his own teacher, Jiraiya, in cold blood, and brutally executed all of Hanzō's friends and family to ensure Amegakure's compliance to his takeover. He even went so far as to proclaim himself a "god of peace", that had to guide the world to maturity through pain. Finally, he felt that no-one could understand true peace unless they understood "true" pain, something his childhood friend Yahiko believed. Minato Namikaze believed Madara Uchiha to have been using this philosophy in his favour, in order to manipulate Nagato. Pain also held hatred for Konoha, because, during the war between Konohagakure and Amegakure, his parents died by the hands of two Konoha ninjas. Nagato's hatred was quelled when he met Jiraiya, who gave him a new goal in life: to protect his friends. However, when Danzo teamed up with Hanzō and forced him to kill Yahiko, Nagato realized that his goal was worthless, and hated Konoha even more, to the point of losing his affections for Jiraiya. Nonetheless, he was seen to be quite respectful, particularly to the fallen and the dead. Given the Akatsuki members' frequent bickering, he often restrained them, and encouraged better relations among members. He even suggested that they mourn for Deidara after his passing, and reprimanded Kisame for calling Hidan and Kakuzu the "Zombie Brothers". After his battle with Jiraiya, he held a moment of silence for his former teacher, out of respect for his power. Pain was also very respectful and kind to his childhood friend, Konan, who he claimed to be his "angel" in Amegakure. He was shown protecting her, without request or hesitation, from Jiraiya, before his battle with his former teacher. Apparently, she was the only Akatsuki member that addressed him by his names, Pain and Nagato.

Pain first appeared as a hologram at the end of Part I in a meeting with other Akatsuki members, stating the need to capture the tailed beasts, particularly the Nine-Tailed Demon Fox. He appeared in the same form at various points in Part II, regulating the actions of other Akatsuki members. As Part II progressed, portions of his face were shown, until he made his debut in the manga, alongside Konan, when receiving orders from Madara Uchiha. Madara assigned him to capture Naruto Uzumaki, the jinchūriki of the Nine-Tails.

In the Shippūden anime, Pain was first introduced, in person, in Orochimaru's flashbacks, when Deva path welcomed Itachi Uchiha as a new member of Akatsuki. Years later, before Sasuke battled Itachi, Pain encountered his former master, Jiraiya, as the latter tried to infiltrate Amegakure, putting a short halt to the Akatsuki leader's attempts to hunt down the Nine-Tails' jinchūriki, Naruto, in Konoha. Pain used the Animal path in order to deal with his old master. During the first half of his battle with Jiraiya, Pain fought the Sannin off with unique summons. It wasn't until Jiraiya activated his Sage Mode and summoned Shima and Fukasaku to help him fight that Pain revealed two more of his bodies (the Preta path and the Human path) and quickly began to overwhelm Jiraiya. Jiraiya brought down all three of the bodies by using the toad elders to perform a powerful genjutsu, and then pierced each body through the heart with a sword. When Jiraiya prepared to head back to Konoha, Pain introduced his Asura path, and struck Jiraiya, severing his left arm. When Jiraiya looked back up, he witnessed all of Pain's six paths standing above, who attacked him together. However, Jiraiya did manage to incapacitate the Animal path, and sent it to Konoha through a toad. In his attempt to learn more about Pain, he was pummelled by the remaining five bodies, and his throat was crushed. Jiraiya then died, sinking into the watery depths of the battlefield, but not before encrypting a coded message on Fukasaku's back with his chakra about Pain's real identity, who managed to escape.

After finding a replacement for the Animal path, Pain and his partner, Konan set out for Konoha to capture Naruto under the orders of the real Akatsuki leader, Madara Uchiha. They eliminated the border guards upon arrival, infiltrated the village, and dispersed, with each of the six paths having a specific task: the Asura, Preta, and Animal paths served as diversions, while the Deva, Human, and Naraka paths took part in reconnaissance, with Konan aiding the latter team. While exploring and destroying the village, Deva path was confronted by Kakashi Hatake. The Asura path came to its aid, but was destroyed by Choza and Choji Akimichi. However, Kakashi ultimately died of using the last reserves of his chakra with the Kamui to save Choji from a still-living Asura path's missiles, and the other Konoha ninja were defeated by Deva path. In other locations across the village, the other paths were drawn into battle as well. The Preta path, while trying to dispose of the captured, former Animal path, was attacked by Kiba Inuzuka, Tsume Inuzuka, and their dogs. Meanwhile, the Naraka path, who was interrogating other Konoha shinobi to find out Naruto's location, was challenged, and seemingly incapacitated, by Konohamaru's Rasengan. Elsewhere, the new Animal path decimated an ANBU building, where a captured Amegakure ninja's mind was being unravelled by Inoichi Yamanaka's mind reading abilities. As for the Human path, it used its own mind-reading powers on Shizune to find out that Naruto was actually training for Sage Mode on Myōbokuzan, and then killed Shizune by ripping out her soul. Later, the Deva path met with Tsunade, the Fifth Hokage. Tsunade refused to tell it about Naruto's whereabouts, and rejected its philosophy of pain and peace in the world. However, after finding out about Naruto from the Human path through their mind connection, the Deva path destroyed the village with a massive Shinra Tensei to counter Tsunade's arguments about pain, while Konan and the rest of the bodies evacuated from their current location. The Naraka path resurrected a destroyed Asura path, and the other bodies caught up with the Deva path at the center of the destroyed village. At that moment, Naruto returned to Konoha from his senjutsu training with his toad allies, only to find his village destroyed by Pain. When a weakened Tsunade arrived before Pain to seek revenge and fight it, the Asura path attacked her, but was quickly destroyed by Naruto's Rasengan. Naruto then had Gamakichi escort Tsunade to a safe place, while he volunteered to fight the remaining five bodies of Pain, instructing the rest of the villagers not to interfere. The Animal path summoned its ram, rhino, and multi-headed dog to attack Naruto, but the latter parried all attacks with the benefits of his Sage Mode, and left their defeat to his toad allies. After this, Naruto destroyed the Preta path and the Human path with his perfected Wind Release: Rasenshuriken. Consecutively, Gamabunta swallowed the Animal path, along with Naruto, in his mouth, where the latter was able to finish it off without interference by using the Rasenrengan. Naruto then tried to defeat the Deva and Naraka paths with another Rasenshuriken, only for the Preta path to reappear and absorb the attack. Realizing that the Naraka path was the key to the Preta path's revival, Naruto focused his efforts on getting rid of it first. Although he succeeded in destroying the Naraka path, the Deva path, after being left temporarily powerless in destroying Konoha, regained its gravity-manipulating abilities, and captured Naruto using the Preta path. As the Preta path tried to grab and absorb Naruto's chakra, Naruto started gathering excessive amounts of natural energy in his still position, which was inadvertently absorbed by the Preta path, turning it into a toad statue. Naruto broke free, only to be captured again by the Deva path, who restrained him with its Chakra Disruption Blades. The Deva path then lectured Naruto about the chain of hatred, pain, suffering and war that the ninja system brought to the world, and how he planned to use the tailed beasts' power to achieve peace and end conflict. During this confrontation, Pain's real body, Nagato, was revealed to have been controlling Deva path from a distance.

With Naruto no longer able to fight back, his allies came to aid him. Pain killed Fukasaku with one of his blades. Later, Hinata Hyuga, who confessed her love for Naruto, drew herself into a short battle with the Deva path, who injured her badly. Hinata's defeat prompted Naruto to enter his six-tailed transformation, which the Deva path was unable to compete with in its current condition. With this epiphany, the Deva path retreated to a location closer to Nagato. This allowed the Deva path to use its most powerful technique, the Chibaku Tensei, to capture the six-tailed Naruto, which led to a short-lived victory, until Naruto progressed to an eight-tailed state, and broke out of the Chibaku Tensei sphere. The sphere of rubble created by the Chibaku Tensei crumbled, and Naruto, having later receded to his normal form, emerged from its remains. With his resolve renewed, Naruto demanded to be taken to Nagato, to speak with him himself. The Deva path, however, stated that, although Naruto now understood true pain, they could never understand each other, as they were just too different. As the Deva path attacked, Naruto broke off a piece of one of its chakra blades, and located Nagato by stabbing himself in the shoulder with it. Naruto then battled the Deva path by throwing two Rasenshuriken in a shadow shuriken method, but the Deva path dodged both of them. In the ensuing chaos, Naruto was able to amass enough shadow clones to resist the Deva path's Shinra Tensei, and was able to hit a final blow on it with a Rasengan. Sensing that the last of his bodies had been defeated, Nagato figured that Naruto would soon track him down. When Naruto finally found him, Nagato informed Konan to stand aside and let Naruto in. He then sarcastically stated that "peace had arrived". Upon his arrival, Nagato attempted to control Naruto by striking him with one of his chakra blades, but Naruto managed to resist it with the Nine-Tails-augmented Sage Mode. Naruto admitted his anger towards Nagato, but held his ground, and asked Nagato how he became to be, despite being a student of Jiraiya. Nagato decided to tell Naruto about his past, recalling his two great sources of pain, the deaths of his parents, and of his friend Yahiko. After discussing his past, Nagato asked Naruto to give him the answer that he had promised earlier. Naruto answered him with a combination of both Nagato's and Jiraiya's plans to achieve peace, greatly confusing Nagato. Nagato became even more shocked as Naruto "broke the cycle of hatred" by deciding not to kill Nagato, despite his hatred towards him. Calling that vision of peace a fantasy, Nagato berated Naruto and Jiraiya on their vision of peace. Naruto replied with a line from the Tale of the Utterly Gutsy Shinobi, which Nagato read after Jiraiya left the Ame Orphans. Naruto declared he would become Hokage to break the end of the suffering of Konoha and Amegakure, and pleaded with Nagato to believe in him, as Jiraiya had once believed in him. Questioning himself, Nagato remembered how Jiraiya had had high hopes for him, and remarked how Naruto reminded him of himself. He then removed his arms from the support machine to perform a final hand seal, stating that he would also believe in Naruto. Nagato used the Outer Path: Samsara of Heavenly Life Technique, and revived all the people of Konoha that had been killed during his invasion. As he had used all of his chakra, a severely weakened Nagato died, after entrusting Naruto to find the answer to peace and pain in the world. Following a series of unexpected events, Konan shed the origami tree that she had created to hide Nagato, and wrapped up the dead bodies of Nagato and Yahiko, to take them with her. Fortunately, Konan revealed that she was through with Akatsuki, as Nagato and Yahiko had meant everything to her, and, as Nagato believed in him, she would also believe in Naruto. After Naruto accepted Nagato as a "fellow pupil", she gave him a bouquet of origami flowers, as a memento of the three Ame orphans, and headed out to Amegakure. Just before she left, Konan said that Amegakure would help Naruto to make his dream come true, perhaps implying that she would attempt to take over leadership of Amegakure in place of Nagato, as she had already been declared as "God's Angel" in the village.

As the leader of Akatsuki, and one of the two sides of the Amegakure Civil War, Nagato was an extraordinarily powerful shinobi, who could easily be considered to be Kage-level, maybe even higher. His partner, Konan, had stated that he had never lost a single battle, but it wasn't until his fight with Naruto that he encountered an opponent capable of defeating him. He was also able to single-handedly defeat and overthrow the former Amegakure leader, Hanzō, and made short work of Jiraiya after unveiling all six of his bodies (though he admitted that killing Jiraiya would have been very unlikely had Jiraiya had prior knowledge of his six separate bodies).

Nagato's incredible power stemmed mainly from his Kekkei Genkai, the Rinnegan. This was originally possessed by the Sage of the Six Paths, the world's first ninja, and the founder of modern ninjutsu. The Rinnegan's abilities were largely unknown, but it did permit the user to use all types of elemental chakra, and allowed Nagato to master every technique Jiraiya taught him. It also enhanced his vision of chakra in a similar manner to the Uchiha Clan's Sharingan and the Hyuga clan's Byakugan, allowing him to see the chakra of barrier techniques around the perimeter of his location, and the chakra gathered at a shinobi's feet.