Yahiko was a shinobi of Amegakure and the founder of the mercendary, Anna
later criminal organization Akatsuki. He was the best friend of Konan and Nagato, who he, together with, trained under the legendary Sannin Jiraiya, as one of his first students.
Yahiko was born prior to the Second Shinobi World War and lost his parents during it. Orphaned, he eventually met Konan, who he teamed up with to survive, while they stole supplies. They also found a suitable spot for a hideout, with konan eventually bringing another orphan named Nagato, and his dog, Chibi, to their make-shift home. Yahiko initially did not like this, but accepted Nagato into his gang after hearing the latter's dreams of peace, and the trio formed a close friendship that lasted until his death. One day, during a battle between Hanzo, leader of Amegakure, and a trio of Konohagakure shinobi, Chibi was killed. After Yahiko and the others mourned the dog's death, Yahiko, impressed by the power the Konoha shinobi, then called the legendary Sannin, they had seen must have had, decided to lead Konan and Nagato on a quest to find them. When they did, Yahiko approached them and asked for food, which was provided by Jiraiya. When Orochimaru questioned whether or not he should kill Yahiko and the others to prevent them from suffering, Jiraiya decided to stay with them until they could fend for themselves. Though Yahiko asked Jiraiya to train them as shinobi, it was only after a Chunnin of Iwagakure had attacked him and Nagato, who killed him with his Rinnegan, that Jiraiya finally decided to train them. After three years, Jiraiya decided to leave Yahiko and his friends, felling they were competent, so that they could pursue their own goals. Throught the years, word of their exploits would reach Jiraiya, but he believed they were killed. In fact, Yahiko formed a mercenary group called Akatsuki, followed by Konan and Nagato, wherein they gathered members who shared their views of peace. His group even gain recognition from Hanzo himself. One day, a masked shinobi named Obito Uchiha, posing as his teacher, Madara Uchiha, and his partner, Zetsu, approached Yahiko and hid friends. Yahiko doubted the masked man's identity and threatened to kill the two if they approached them again, leading Konan and Nagato away.
Bad luck was destined to arise, however, as Hanzo began to view Akatsuki as a threat to his power and regime, and plotted with Konohagakure's Danzo Shimura to destroy the three main members. Hanzo tricked Yahiko, Konan, and Nagato into a trap with an offer of peace talks and, taking Konan captive, told Nagato to kill Yahiko to save her. Yahiko told Nagato to kill him, despite Konan's attempt to convince them to leave without her, and as Nagato was hesistant, Yahiko stabbed himself with Nagato's kunai to save him the trouble, smiling as he died, believing Nagato to the one who would bring peace that Jiraiya spoke of in the past. After this, Nagato became enraged, saved Konan, and wiped out all of Hanzo and Danzo's men, with them only escaping. His body was later made into Nagato's Deva Path for his Six Paths of Pain technique, which until the technique's defeat by Naruto Uzumaki, acted as Nagato's representative in Akatsuki, which he took lead of after Yahiko's death.
Yahiko was a very tough-spirited individual, even as a child, always lecturing Nagato not to cry and to be more like a man(even though it was him who cried when Jiraiya decided to leave them). He always acted as leader for his group, calling all the shots and was the one who approached the Sannin first when they found them, as wells as the one wgo asked for food for his group. At least as a child, Yahiko developed strong feelings of love for Konan, who returned his feelings. Whether these were traits they carried into adulthood is unclear. Yahiko hated the conditions of the land which they lived in and what it became, describing the constant rain as tears, and desired to become a god to rule the world and end all wars. Many of these traits he passed on to Nagato after he died. After living with Jiraiya for long enough, Yahiko began to act somewhat like him, displaying his boastful poses and facial expressions. He was still overal a very serious person and was very protective of his allies, shown when he threatened to kill Obito Uchiha, who was posing as Madara Uchiha, and his partner Zetsu after the duo approached him and his friends and made Yahiko unsure of them. Je, at least inn later years, also had a lot of faith in Nagato's power, believing him to be the bringer of peace Jiraiya talked about and, to this end, committed suicide to save Nagato the trouble and let him and Konan go free from Hanzo's trap.
When he was alive, Yahiko was a powerful and capable shinobi thanks to Jiraiya's training, and was able to easily dispatch a shadow clone of him when working with Konan and Nagato. Yahiko was an accomplished Water Release user and a natural leader, able to found the mercenary organization Akatsuki, which garnered attention from even Hanzo, leader of Amegakure, and command the loyalty of all the members who joined without trouble.