Snake-legends form an important part of the various Brahmanical myths and legends found in the Mahabharata. Interesting from the point of view of mythology and tradition is the frame-story of the Snake sacrifice of Janamejaya. Into this frame story is interwoven a tangle of stories, snake-legends, myths of the bird Garuda and others. But what is here called "Snake-sacrifice" is in reality a snake-charm, i.e. an exorcism for the annihilation of snakes.
In the legend, Janamejaya`s father, Pariksit, had been bitten to death by the snake-king Taksaka. In order to avenge the death of his father, King Janamejaya arranges a great sacrifice. At this sacrifice, the snakes from all corners of the earth are compelled by the exorcisms of the priests to cast themselves into the fire. As the sacrificial ceremony for the snake sacrifice was carried out in accordance with the prescribed rules for snake-sacrifice, the priests are said to have been busy running here and thither each one eagerly fulfilling his appointed task. The priests were wrapped in black garments as they poured the sacrificial ghee into the blazing fire while saying the incantations. The result of the snake sacrifice was that it caused the hearts of all the snakes started quaking and they were automatically drawn into the jaws of the fire. They fell into the naming furnace, distorting their bodies and calling on one another.
With this legend of the snake-sacrifice, the ancient myth of Kadru and Vinita, occurring already in Vedic texts, is here combined. Kadru, "the red-brown one," is the earth and the mother of the snakes. Vinita, "the curved one," is the vault of heaven and the mother of the mythical bird Garuda. There is also interwoven the myth of the twirling of the oceans which occurs also in the Ramayana and in the Indian Puranas, and is again and again related, or used for purposes of illustration and comparison by poets of later times. The various episodes- of Gods and demons twirling the ocean in order to obtain the draught of immortality, the mountain Mandara serving as a twirling-stick and the snake-prince Vasuki as a rope, the moon arising out of the foaming mass, of Goddess Lakshmi, the Goddess of good fortune and of beauty, the intoxicating drink Sura and other precious things, and at last the beautiful god Dhanvantari, holding the draught of immortality in a shining white goblet, appearing from out of the ocean- are described in a minute and almost life-like manner.
One more of the snake-legends interwoven into the frame-story is the story of Ruru partly only a duplicate of the legend of the snake-sacrifice itself, for, like Janamejaya, Ruru vows to annihilate all snakes. Ruru, son of a Brahmin, once saw the lovely virgin Pramadvari, daughter of an Apsara, and was seized with love for her. She became his bride, but a few days before the wedding, she is bitten by a poisonous snake while she is at play. She lies there lifeless, as though asleep and looking exceedingly beautiful. All the pious hermits approach, and, moved by pity burst into tears, but Ruru goes forth into the depth of the forest in his sorrow. Lamenting loudly, he invokes the gods to have regard to his penance and his pious life and to give his beloved back to him. Then a messenger from the gods appears, and announces that Pramadvari can only be recalled to life if Ruru will yield half of his own life for her. Ruru agrees at once, and the King of Law, i.e. the god of death, gives his consent for Pramadvara to be recalled to life. Soon afterwards, on a happy day, the two are wedded. Now Ruru vowed to destroy all the snakes in the world, and thenceforth, whenever he saw a snake, he killed it. But one day he happened to attack a non-poisonous snake which asked him to spare it. It was in reality a rishi who was compelled to live as a snake in consequence of a curse and who was now released from the curse by his meeting with Ruru. In his human form he admonishes Ruru to desist from destroying living creatures.
These are the various snake legends among the Brahmanical myths and legends mentioned in the Mahabharata.