The Japanese legend of Prince Yamato is often considered the first ninja story, although Yamato did not adopt the black costume or stealthy tactics so often associated with ninja. Instead, he used deception, dressing as a woman to attract two barbarian chieftains. When the chieftains had been lulled into a false sense of security, Yamato drew a hidden sword and killed them both. His use of a disguise is a hallmark of ninja tactics, so Yamato is sometimes called "The First Ninja." See Rick Walton's Online Library: The Story of Prince Yamato Take to learn more about this legend.
Another important part of ninja folklore is the story of 13-year-old Kumawaka. Kumawaka had traveled very far to visit his dying father, but a monk who was keeping the father as a prisoner would not allow the two to meet. Kumawaka's father died before he had a chance to see him, so the boy vowed revenge upon the monk.
At age 13, he wasn't strong enough to simply fight the monk and his family. Instead, he faked an illness so they would take him into their home. There, he would sneak around at night, finding out where everyone slept and when the guards patrolled. One night, he snuck into the monk's room. The monk slept with a lamp burning, so the boy opened a window and allowed moths to enter the room. They flocked to the light of the lamp and completely covered it, leaving the room in darkness. Then, Kumawaka stole the monk's sword and murdered him in his bed.
Fleeing out a window, the boy was chased by guards until he reached a river. He cleverly climbed to the top of a bamboo plant near the river, leaned until the flexible bamboo stalk bent out across the water, and then jumped off and escaped the guards.
Although he was only 13, and didn't call himself a ninja, Kumawaka's use of deception, stealth, and cleverness inspired generations of Japanese warriors who did adopt the name ninja.