The news of the Pandavas and their marriage to Draupadi reached Hastinapur. On the request of Bhishma all the Pandavas were brought respectfully to Hastinapur. After some time it was decided in the assembly that the Pandavas be given away half the kingdom. Dhritrashtra and his sons gave away Khandavprastha forest as half the kingdom by deceit. The Pandavas accepted it gladly.
Long ago, King Swetaki was known to conduct long sacrifices that left the priests sick and tired. So, when he wanted to conduct a hundred-year sacrifice, they all refused and went over to Rudra. Rudra told the king to offer ghee in a sacrificial fire for twelve years. The king did that, appeased Rudra and after the great sacrifice proceeded to heaven. Meanwhile Agni, the Fire-god, suffered from indigestion because of too much ghee! He went over to Lord Brahma who requested that he (Fire-god) would restore his health if he burnt the dangerous animals living in Khandavprashta to ashes.
The Fire-god tried many a time but could not burn the animals as Indra stopped him from burning serpent Takshak and other animals to ashes. Thereupon, the Fire-god sought the help of Krishna and Arjuna in this matter. In return for their help in burning Khandavprastha forest to ashes, the Fire-god got Varuna, the Water-god, to give the chakra to Krishna. It would return to its owner after destroying its aim. He also gave the bow, Gandiva, with a never-ending quiver of arrows and a chariot drawn by swift steeds to Arjuna. With the permission of Krishna and Arjuna the Fire-god reduced the entire Khandavprastha forest to ashes. Thus he was relieved of his ailment. Only serpent Takshak, Ashurasena, Mayasura and four Shangark birds escaped the wrath of the Fire-god. Seeing Mayasura fleeing Arjuna caught hold of him and entrusted him with the responsibility of building a city over there. They went to a deserted place in the forest. The place had a divine gem-studded chariot, a bow and the Kaumudi mace. Mayasura gave away the divine chariot to Krishna, the bow to Arjuna and the mace to Bhima. The palace was built over that very place. As the city resembled Indrapuri, it was named Indraprastha.
The Royal Preceptor sage Dhaumaya, the other saints and sages and Brahmins crowned Yudhishthira amidst the chanting of vedic mantras. The ten quarters reverberated with the victory slogans of the subjects.