After wandering for a long time in the Janapadas, a thief named Khemaka arrived at Jetavana Vihara. He was searching for Prince Siddhartha, unaware that the prince had become the Buddha. In Khemaka's possession was a royal robe wrapped in a way that made it unrecognisable. This robe had originally been given to him by Prince Siddhartha.
When people in the forest threw stones at Khemaka for stealing, he fled and sought refuge within a grove. He had no hunting weapons and was wandering, hungry and without food, lamenting his fate. Sitting on a rock, he noticed a monk meditating under a canopy of trees. A deer, a rabbit, and a wolf stood in harmony with him; the wolf did not even glance at the rabbit. Khemaka felt that they must be attached to the yogi, and he thought that if they stayed close to him like that, he could catch the rabbit without weapons.
As he contemplated how to obtain the saffron robe worn by the monk, Khemaka came up with the idea of stealing it. The monk took off his robe and left it on a rock while he went to bathe in the river. Seizing the opportunity, Khemaka stole the robe and fled into a different part of the forest.
Meanwhile, Prince Siddhartha had left the palace and had arrived near the forest. Khemaka, now dressed in the saffron robes, roamed the area hunting small animals. Upon seeing the monk, Khemaka confronted him, claiming he was neither a monk nor a thief, and recounted how he had acquired the saffron robe. Siddhartha advised him not to sin by wearing the saffron robes dishonestly and offered to buy the thief's saffron clothes in exchange for his royal garments. He encouraged Khemaka to sell the jewelled garments and pursue a different life.
After leaving the forest, Khemaka attempted to sell the royal robes at the market, but the merchants caught him. Cleverly, he managed to escape by wrapping the royal robes around himself. He tried to sell the valuable clothing multiple times but was unsuccessful. The gems in the royal robe continued to captivate him. One day, he noticed a snake coiled around his bundled bag. Miraculously, he escaped the snake's bite. However, this incident repeated a few more times, leading Khemaka to become frightened and realise that it would be wiser to surrender the royal robes. From that day on, Khemaka searched for Prince Siddhartha.
Upon arriving at Jetavana, he said, "Young king, you must accept this royal robe back. You do not need to return the saffron robes to me." Khemaka then recounted the hardships he had faced because of the royal robes.
"I'm not the king now, Khemaka," Buddha replied, closing his eyes and meditating, saddened by the thought of the clothes he had given up that had now come back to him.