There was a king by name Parikshit. He was the son of Abhimanyu and the grandson of Arjuna.
After the Mahabharata war, Drona’s son Aswathama tried to decimate the entire Pandava race to avenge the killing of the Kauravas by the Pandavas in the Kurukshetra war using the most powerful Narayana Astra. Parikshit who was in the womb of Uthara, Abhimanyu’s wife was protected by Krishna using his Sudarsana Chakra.
Parikshit was a great warrior. He was also fond of hunting. Once while hunting in a forest, he pierced a deer with his arrow. The wounded deer ran away.
Parikshit went in search of the deer. He walked a long distance in the forest but could not find the deer. Fatigued and thirsty, he came across
Sage Samika was seated in a cow-pen drinking the froth oozing out of the mouths of calves after they had fed themselves of the cows.
Parikshit asked the sage, “Oh saint, I am King Parikshit, son of Abhimanyu. A deer pierced by me has been lost. Did you see it?'
Since the sage was observing a vow of silence, he didn’t reply. Angered by the sage’s silence, Parikshit picked up a dead snake with the end of his bow and placed it on the sage’s shoulder. Even then, the sage didn’t react and suffered the insult silently.
Finding that the sage didn’t protest at the treatment meted out to him, Parikshit felt sorry for his act and returned to his place quietly.
Sage Samika had a son by name Sringin who had gone out. He had great energy and observed severe austerities. He was severe in his vows, very wrathful, and difficult to be appeased.
One of his friends told him that King Parikshit had insulted his father by placing a dead snake on his shoulder.
Sringin became very angry on hearing this and cursed Parikshit to be bitten by Thakshaka, the King of snakes within seven days. After throwing this curse, Sringin went to his father and found him sitting with the dead snake on his shoulder. He told his father that he had cursed Parikshit.
The sage chided his son saying, “I am not happy about what you have done. Ascetics should observe restraint. We live in the country ruled by King Parikshit and we are protected by him. If he didn’t protect us, we wouldn’t be able to perform the penances peacefully.
"Parikshit was tired and thirsty when he came here. He was not aware of my vow of silence and had acted in haste. We should have forgiven him.. The king protects the sacrificial rites and these rites please the gods who give us rains which help the plants and trees that provide food to us grow. A country without a king will suffer. You have acted in haste and you have acted with immaturity.”
Sirgin replied, “Whether what I have done is right or not, the words I have uttered will come true and a curse can never be revoked.”
Sage Samika sent one of his disciples named Gurumukha to King Parikshit for apprising the king of the curse.
Gurumukha went to the palace met the king and apprised him of the developments.
Parikshit grieved not so much about the curse as about the fact that he had insulted the great sage without being aware of his vow of silence.
Parikshit then consulted his ministers and as per their advice had a mansion erected on a solitary column. The mansion was closely protected by guards and no one could enter the palace unseen. Brahmins sitting in the mansion were engaged in chanting mantras continuously.
On the seventh day, a Brahmin named Kasyapa decided to go to the palace with the intention of bringing the king back to life in case he was bitten by Thakshaka, the snake, thereby earning the goodwill of the king.
On the way he was met by Thakshka in the guise of a Brahmin. After ascertaining the intention of Kasyapa, Thakshaka revealed his identity and told him that Kasyapa couldn’t bring the king back to life after he was bitten by him. But Kasyapa claimed that he had the power to revive the king, after he was bitten by the snake.
Thakshka said that he would bite a banyan tree that was on the side of the road and challenged Kasyapa to bring it back to life. Kasyapa accepted the challenge.
Thakshaka bit the banyan tree. The poison released by the snake blazed like a fire and burnt the tree to ashes. But Kasyapa brought back the tree to life by first reviving its sprout, then making two leaves appear, then creating the stem, then the branches and so on.
Impressed by Kasyapa’s feat, Thakshaka asked Kasyapa why he wanted to save the king. When Kasyapa said that he wanted to get huge wealth from the king, Thakshaka offered to give him more wealth than the king would give.
Tempted by this offer, Kasyapa sat in meditation and through his spiritual powers learnt that the king’s life span was coming to an end. So he accepted the large quantity of gold given by Thakshaka and went away.
Thakshaka then devised a deception to enter the mansion. He made some snakes take the form of ascetics and enter the palace with gifts of fruits for the king.
Thakshaka took the form of a small insect and penetrated one of the fruits. The snakes, as per the plan, disguised themselves as ascetics and entered the mansion and met the king.
The unsuspecting king accepted the gifts offered to him. After the ‘ascetics’ had left, King Parikshit, along with his ministers began to eat the fruits.
As fate would have it, the fruit in which Thakshaka was hiding came to be eaten by the king. Parikshit observed a small insect coming out of the fruit and took it in his hand.
Parikshit told his ministers, “The sun is about to set. The deadline for the curse is about to end. Let this insect become Thakshaka and bite me so that my sin will be expiated by the words of the sage coming true.”
This was seconded by all the wise men assembled there.
King Parkikshit placed the insect on his neck. Even as the King was smiling, Thakshaka assuming his real form coiled around the king's neck and bit him causing him to die instantly. The entire mansion blazed with the fire of Thakshaka’s poison making all the ministers flee the scene.