The Bodhisatta was once the King of Varanasi and he ruled righteously, wisely, and generously. He had expelled one of his advisors from the kingdom for making personal use of the royal harem and this man later became the chief advisor to the King of Kosala. The ex-advisor convinced this king that the Bodhisatta was a weak leader and could easily be conquered. Upon hearing this plan, the King of Kosala suspected that his advisor was a traitor sent to lead him into a trap, but the advisor said he could prove it. He told the king to send some men to massacre a village across the border and he would see that they would not be punished. The king did so. The murderous attackers were captured and sent to the palace where the Bodhisatta asked why they had killed the villagers. When they answered that it was because they were poor and could not find work, the Bodhisatta made them promise to not do it again, gave them money, and set them free.
Though things transpired just as his advisor said they would, the King of Kosala was still not convinced. So he repeated the test twice more, the last time inside the capital city, and after the same results he realized his advisor was right about the Bodhisatta being a thoroughly righteous man and no threat at all.
So the King of Kosala set out on conquest with his army and elephants. Varanasi had the bravest, fiercest warriors in all of India and when word spread of the coming invasion, they begged the Bodhisatta to set them loose, as did his advisors. But the Bodhisatta was steadfast that he would not allow anyone to suffer and prohibited any resistance. When the invaders arrived at the city the Bodhisatta opened the gate and let them in. The King of Kosala ordered the Bodhisatta and his advisors imprisoned.
As he sat in chains, the Bodhisatta felt deep pity for his conqueror and this created a strong burning pain in that king’s body. Asking the cause of his torment, the king was told that it was because he had put a righteous king in prison. Realizing he had made a mistake, he asked the Bodhisatta for forgiveness, which was granted, and promised to help protect his kingdom from any future enemies. After punishing the advisor, the King of Kosala returned to his own kingdom.
The Bodhisatta told those gathered around him that it was only because of his dedication to kindness that he had been able to save his kingdom with no lives lost, and if they followed his example they would end up in heaven. Then he surrendered his throne and lived out his life as an ascetic.
In the Lifetime of the Buddha
One of the king’s servants was very devoted and helpful. The king gave him the great honor that he deserved, but this made the others jealous and they concocted a slander against him, which the king believed without investigating. So this innocent servant was imprisoned in chains, but he was so virtuous that he maintained his peace of mind and had a spiritual breakthrough in understanding the conditions of existence. Eventually the king learned the truth and set the servant free and gave him even more honor than before.
Soon after, the servant decided to visit the Buddha and told him how he had turned his recent misfortune into something positive. The Buddha told him this story so he knew that in the past he himself had also turned evil into good.
The King of Kosala was an earlier birth of Ananda, one of the Buddha’s top disciples.