Pein was once a young man named Nagato. During his youth in the war torn Rain Country, Nagato lived with his family. When two Leaf ninja came into their home looking for food, things spun out of control and his parents were killed. Newly orphaned, he met fellow orphans Konan and Yahiko. Nagato was a quiet child who admired Yahiko's desire to improve their living conditions and bring some justice to the world, even if it meant becoming its god. The trio met the Sannin following the war with Hidden Rain. Jiraiya took a liking to the children and stayed behind to look after them. He was surprised to learn that the emotional and quiet Nagato was a wielder of the Rinnegan, the venerated Doujutsu once possessed by Rikudou Sennin, the man regarded as the original modern shinobi. Nagato and Yahiko were accosted by a vagrant Rock Ninja, and Yahiko moved to defend them. He was injured and Nagato went into a berserk rage, quickly killing the ninja. Nagato was shocked when he finally regained control and Jiraiya promised to train the orphans.
Nagato had trouble dealing with the way he reacted to the Rock ninja and Jiraiya explained that he shouldn't feel ashamed, as he was defending his friend. And that knowing what it feels like to be hurt is the reason why humans are kind to others. Nagato wondered how he could become like that and Jiraiya explained it just came with age. Nagato then promised to keep his friends safe, no matter what pain he had to experience. Jiraiya was inspired by the young man, and based his new book character on Nagato's never give up attitude. Three years passed and the trio were soon skilled enough to defeat one of Jiraiya's Kage Bunshin. Jiraiya explained that his time with them had ended and that hard times would still be ahead for them. But by working together they could change things, as they had finally grown up. He left his finished book for the group, which Nagato found and read. Over the following years the trio formed a group of like minded individuals under Yahiko's leadership. To that end, they hoped to broker a peace between the warring countries.
Responding to a summons from Sanshouuo no Hanzou, the leader of Hidden Rain, the group was ambushed by Hanzou and ANBU Root under Danzou. Taking Konan hostage, Hanzou demanded Nagato kill Yahiko. Unable to stab his friend with the kunai in his hand, Yahiko forced his comrade to do it, ending his life. Yahiko told Nagato and Konan to stay alive and offered that Nagato could change the world. That event acted as the second pain trauma in Nagato's life after his parent's death, causing the young man to believe that his answer to the world's problems was worthless. Hanzou then ordered his men to kill Nagato. He avoided their attacks and managed to free Konan at the cost of damaging his legs. Filled with rage he called forth a gigantic blinded statue which extended black chakra rods into Nagato's back. As Nagato begame to become emaciated, spectral dragons emerged which flew throught he surrounding ninja to steal their souls. Hanzou fled, leaving Nagato a withered shadow of his former self. Nagato ended his ties to Hidden Rain and took on the name of "Pain". Konan would also join him.
As Pein, Nagato began to gather other disenfranchised Rain shinobi and start a civil war with Hidden Rain. No longer believing that the cycle of hatred could stop, he sought more drastic means to end it through violence. Seeking some revenge for Yahiko's death, he fought Hanzou once again and killed him in battle. He did not stop with merely Hanzou though, for he killed Hanzou's family, friends and associates; essentially taking down Hidden Rain all by himself. And though Pain had followers, they never saw him personally. His abilities, appearance and heartless nature thus fueled rumors about his identity. This also caused his followers to revere him as a god. In this position he operated out of the tallest tower in the Rain Country industrial city. It was from this tower he maintained a room which hid his greatest secret. Through the development of his Rinnegan, he gained the ability to control all Six Paths. Using the black chakra rods still implanted in his back from the time he first fought Hanzou, he discovered how to manipulate the bodies of corpses.
Some years later Pein became part of the Akatsuki organization. Konan joined as well, and was one of the few living persons aware of Pein's past. Over the years she had seen him fight many battles and believed that he had never once lost in battle. She and his followers were also aware of his ability to control the rain around them. This he apparently did on schedule, so when rain fell on other days, his followers knew something was on his mind. Pein could also use this water to detect the chakra of opponents and feel their presence.
As leader of Akatsuki, Pein was adamant that the group could fulfill their desires if they possessed the bijuu. He used many skills to help further the goals of the group. One jutsu was a Shouten technique, which allowed the group members to take over the sacrificed body of another in exchange for some measure of their chakra. He also was responsible for summoning the huge King of Hell statue which held the bijuu withdrawn from Jinchuuriki.
Pein told the group their ultimate goal was to control the world, which could be accomplished through three steps: Step One is for the group to attain money. Step Two is to create the first mercenary group. Shinobi villages make money for their country, and for the money to be steady it requires war. Because there have not been any large scale wars in awhile, the ninja villages were being reduced in size. The Five Great Shinobi Villages could handle the downtrend, but the smaller villages could not. Akatsuki would form their own fighting force with no country allegiance. This force could undercut all the other villages and fight their battles for cheap. Then using the bijuu they could create new wars and gain a monopoly over the whole market. In the end they would control all the wars and be powerful enough to even collapse the shinobi villages of the large countries, forcing them to rely on Akatsuki as well. With all that in hand, the group can achieve Step Three, to control the world.
This stated goal may actually be a smokescreen, however, as Pein was seen reporting to new Akatsuki recruit Tobi in secret. Tobi directed Pein to capture Naruto personally in his role as leader, which apparently drew out an emotional response from Pein in the form of rain. It was then revealed that Tobi was in fact the long thought dead Uchiha Madara, a legendary shinobi like Rikudou Sennin. While Pein was making preparations to capture Naruto, he was alerted to the arrival of his former sensei Jiraiya in Hidden Rain. Pein went into his secret hideout, which housed the bodies of five other cloaked figures. As one Pein moved to rest, another rose from his slumber. This hidden ability of Rinnegan to share multiple bodies with one consciousness would prove decisive in his upcoming battle. Leaving behind the body he used in the series up to this point, Pein selected a body skilled in summoning.
As he appeared before Jiraiya, his former teacher learned that the young boy he once knew as Nagato was now the completely different looking ninja before him. Pein explained how the past mattered little, but that Yahiko was now dead and that the pain of all the people who died there helped him grow as a person. It was this very pain that allowed him to grown from a mere person into a god. And as a god, he would put an end to wars through the creation of the ultimate Kinjutsu. A jutsu fueled by the power of the Bijuu, one strong enough to wipe one of the Five Great Shinobi Countries off the map. This jutsu would be offered to anyone, and through mutually assured destruction and the pain that follows such slaughter, mankind would be afraid to cause war again in the future and peace could finally be achieved.
The battle continued and what followed was a barrage of summoned animal attacks, with Jiraiya summoning a toad to help him battle the various beasts Pein called to his aid. Pein eventually summoned a giant chameleon which he used to blend into the surroundings and disappear. Jiraiya responded by calling upon two elder Toad Sennin to assist. It was then revealed that Pein could possibly be the "destined" child, a student of Jiraiya's prophesized to bring peace or ultimate destruction to the world. The Sennin managed to take out the Chameleon and force Pein to show himself once again.
Standing before the Sennin, Pein moved to summon yet again. This time two other Rinnegan users were called to his side. For the first time another deadly power of the Rinnegan was revealed, Pein's ability to operate multiple bodies at once and share the sensory information between them. These two new bodies each had their own specialties and skills. The battle began and one of the Peins moved to use Taijutsu against Jiraiya; which he countered with a kick to the face, blinding the attacker. Another body used an absorption technique to dissipate any incoming chakra or elemental attack. Seeing his foe have the upper hand, Jiraiya fled to nearby pipes.
Pein gave chase but fell into a well placed Genjutsu trap by Jiraiya and the toads. Unable to use his Rinnegan to counter, Jiraiya captured the three men and immobilized them. Jiraiya offered that he was sad Nagato had led his life astray. He then finished them off by impaling them into the ground. While thinking over his victory Jiraiya was suddenly blasted away through the nearby city. Three more Rinnegan users had arrived, one of which removed the impaling swords from his fallen comrades. This individual apparently revived the slain bodies and soon six Rinnegan users stood before the severely injured Jiraiya. Among the group was Pein's initial body, which Jiraiya quickly recognized was an adult Yahiko. Jiraiya tried to grasp why the man Nagato claimed was dead was among the group before him. Pein acknowledged Yahiko's death, but said the man before him was Pein, they all were. Together they were Pein Rikudou, and as such, were a god.
The six men forced Jiraiya to retreat into the stomach of a summoned toad. The summoning Pein managed to infiltrate the barrier and stab Jiraiya with his chakra disruption spear. The maneuver cost him his life and Jiraiya finally noticed that the Pein before him was a man he had fought years before. Unable to figure out what that meant, Jiraiya risked his life to leave the barrier and confront Pein once again. He quickly saw that all the Peins before him were ninja he had met in the past from all over the world. In that instant he realized Pein's true identity. Pein quickly moved to silence Jiraiya and the men all stabbed their former teacher, killing him. As they moved to leave they watched in surprise as Jiraiya willed himself back to life, to leave one final message with the remaining Toad Sennin, that of Pein's true identity. One Pein fired off his arm to stop the message but the toad escaped in time. Jiraiya himself succeeded in his mission and disappeared into the nearby depths of murky water. The Yahiko Pein then used his Suiton abilities to sense the dying Jiraiya's escape. Zetsu then arrived and offered his thoughts on the battle. The previously unbeaten Pein then offered that it was only by keeping his secret that he was allowed victory that day. With the knowledge of his true nature escaping with one of the Toad Sennin, Pain's days may be numbered.
Sometime later Konoha received Jiraiya's coded message along with the frog containing his Fuuma Clan body. This body was taken for autopsy by Shizune to help learn its secrets. Jiraiya's code was given to the Konoha Code Breakers and Shikamaru. The group went to Naruto for help. He pointed out how the initial character was probably a "ta" rather than a number 9. This lead to the group pulling the first words on certain pages in Icha Icha Tactics that corresponded to the numbers in Jiraiya's code. When brought together the code stated that "the real one isn't with them". Possibly hinting that the real Pein does not travel with the Rikudou bodies. Since he lost the use of the Fuuma body, Pein revealed a new member to his group, a pierced kunoichi. With his Rikudou army now six strong, Pein and Konan finally set out to hunt for the Kyuubi in Konoha.
Upon reaching the outer wall of Konoha, Pein Rikudou and Konan took on their assignments. The Asura, Animal and Hungry Ghost Realm bodies would act as diversions, while Konan and the Deva, Human and Hell realms acted as reconnaissance to hunt for Naruto. Seeking to hide their numbers, Asura hurled Animal through the barrier protecting the village. Once inside, she summoned the rest of the group. The group then split to begin their attack. Asura removed his forearm to launch missile attacks and Animal summoned a giant centipede. Human found a Leaf ninja and interrogated him as to the Kyuubi's whereabouts. The man did not know Naruto's location so Human removed the man's soul and continued on.