In epic Mahabharata, Janamejaya was mentioned as having six able brothers viz, Kakshasena, Ugrasena, Chitrasena, Indrasena, Sushena and Bhimasena. The initial chapters of the epic narrates various aspects of his life including his conquest of Takshasila and about his encounter with Naga Takshaka. He wanted to exterminate the race of Nagas, since Takshaka was responsible for the death of his father Parikshita. Emperor Janamejaya was responsible for the retelling of the famous epic Mahābhārata a story of Janamejaya's ancestors from the time of Bharata up to the great Kurukshetra war between his great grandfathers the Pandavas and their paternal cousins the Kauravas. This was recited to him by the sage Vaishampayana after he asked the sage about his ancestors.
Emperor Janamejaya ascended to the throne of Hastinapura upon the death of his father Parikshita. According to legend, Parikshita, the lone descendant of the House of Pandu, had died of snakebite. He had been cursed by a sage to die so, the curse having been consummated by the serpent-chieftain Takshak.
Janamejaya bore a deep grudge against the serpents for this act, and thus decided to wipe them out altogether. He attempted this by performing a great Sarpa satra - a sacrifice that would destroy all living serpents.
Just as he was about to begin the sacrifice, the rishi Vyasa arrived with a host of rishis. The sages told Janamejaya that to avenge himself on all Nagas, for the action of one, who was after all consummating a curse, would be unrighteous, and not worthy of one descended from the Pandavas themselves. Janamejaya desists from completing the sacrifice. Upon Janamejaya's expressed curiosity as to the lives and actions of his forefathers, Vyasa's disciple Vaishampayana then narrates the Mahābhārata, at the spot where the homa was to have to have been held.
The mass sacrifice was started on the banks of the river Arind at Bardan, now Known as Parham, a corrupt form of Parikshitgarh, A masonry tank said to have been built by Emperor Janamejaya to mark the site of the sacrificial pit, known as Parikshit kund, still exists in Mainpuri district. Close to this village a very large and high khera containing the ruins of a fort and some stone sculptures has been found . It is said to date back to the time of Emperor Parikshita. A popular local legend is that as a consequence of the virtues of that sacrifice snakes are still harmless in this place and its neighborhood.