After the destruction of the Vrsnis, Yudhisthira resolved to depart from this world. He made over a part of the kingdom to Yuyutsu, the son of Dhritarashtra by his Vaisya wife; installed Pariksit on the throne, and made Vajra, a survivor of the Yadus a king. Pariksit was to rule at Hastinapura, and Vajra at Indraprastha; and he installed Krpa as the preceptor of Pariksit.
The Last Journey: Then he and all his brothers as well as Draupadi, clad themselves in barks of trees and, followed by a Dog, turned their face to the east and started on their journey. Yudhisthira proceeded first; he was followed by Bhima; he by Arjuna; while the two twins came after them in order of their birth. Behind them all came Draupadi, that foremost of women; and as they started, a Dog followed them. They proceeded on, and reached the sea of red waters. There the god of Fire met them and, at his bidding, Arjuna threw back into the Ocean that foremost of bows, Gandiva, which had been procured by Agni from Varuna for his use. They then turned to the south, then southwest, and then west, and saw the city of Dwarka covered by the sea. Then, turning to the north, those foremost ones went on.
The Death of the Pandavas: Proceeding to the north, they saw Himavat (Himalayas) and, crossing it, beheld a vast desert of sand; and then saw the powerful mountain Meru. As they were proceeding quickly, rapt in Yoga, Draupadi dropped down on the earth; then Sahadeva, Nakula, Arjuna and Bhima fell down dead on the earth in turn. Yudhisthira alone, followed by the Dog, went on.
Yudhisthira and his Dog: Then Indra came down in his car, and bade him ascend it with him. Yudhisthira asked him to take his brothers, and he replied that they had all ascended to Heaven before him. Then Yudhisthira insisted that the Dog who had followed him; should accompany him; and when Indra replied that there was no place for dogs in heaven, the king refused to accompany Indra to heaven unless his Dog went with him too. Thereupon, seeing his devotion to the animal, the Dog transformed itself into Dharma, the deity of Virtue, and they all ascended to Heaven.