Naruto And Pain, were the greatest ninjas in the war going on between the 2 great nations, The Hidden Leaf Village and The Sand Village. They came to agree to end the war and make peace between the nations when the great Madara was back to life by EDO TENSEI (ability) to bring back people to life, by Orochimaru. In the fight against The Great Madara they both died, and Madara escaped EDO TENSEI and he became able to control himself. So Orochimaru fused naruto and pain together to create the legendary creature Narupain who gathered all the nations and ended the myth of MADARA once and for all.