Nagato (長門, Nagato) was a shinobi of Amegakure and descendant of the Uzumaki clan. Forming Akatsuki alongside his friends (and fellow war orphans) Yahiko and Konan, Nagato dreamed of bringing peace to the violent shinobi world. However, following Yahiko’s death, Nagato adopted the alias of Pain (ペイン, Pein) and, along with Konan, began leading a new Akatsuki — one that would force the world into peace using any means necessary.
Nagato lived with his parents: Fusō and Ise on the outskirts of Amegakure. When he was very young, Madara Uchiha secretly transplanted his Rinnegan into Nagato without his or his parents’ knowledge. Sometime later, during the Second Shinobi World War, Nagato and his parents took shelter in their home to avoid the fighting going on around them. One day, two Konoha shinobi broke into their home looking for food and Nagato and his parents tried to sneak out unnoticed. When they were discovered, his parents attacked the shinobi so that Nagato could escape. The Konoha ninja killed his parents in self-defence and, upon realising they were only civilians, tried apologising to Nagato. Overcome with grief, Nagato used Madara’s Rinnegan for the first time to kill them and avenge his parents.
After burying his parents, Nagato, now an orphan, was forced to leave home and begin wandering in search of food and shelter. With resources scarce due to the ongoing war, no one he met would help him until Nagato, who had collapsed from hunger, was found by Konan and Yahiko, orphans like himself. They banded together, acquired food to survive through any means, and shared dreams of a future where they were in charge and could use their power to eliminate war. Yahiko was particularly passionate about this point, which inspired Nagato to adopt the same goal. In order to accomplish this, the three would need to become ninja. With few options to choose from, they approached Konoha’s Legendary Sannin and asked to be taught ninjutsu. Orochimaru offered to kill them in order to end their suffering, but Jiraiya, guilty over his participation in the war, offered to teach them how to look out for themselves.