Everybody walks north
The war has been over for a long time. Yudhishthira has ruled for thirty-six years, which the text reports without much enthusiasm, because governing an empire you obtained by killing your own cousins turns out to be less satisfying than advertised.
Then Krishna dies. The Yadavas, his own clan, destroy themselves in a drunken brawl on a beach using reeds that turn into iron clubs, which is the sort of thing that happens towards the end of this book.
The Pandavas decide they are finished. Parikshit — Abhimanyu's son, the last of the line — is put on the throne. The five brothers and Draupadi take off their ornaments, put on bark, and start walking north towards Mount Meru. This is the mahaprasthana, the great departure. You walk until you stop.
Somewhere along the road a dog starts following them. The text makes nothing of it at all. It is just a dog, and it comes along.
They fall in order
Draupadi goes first. Bhima, who has never in his life been able to leave a question alone, asks why. Yudhishthira answers without turning round: she loved Arjuna more than the rest of them.
Sahadeva next. He believed nobody was as wise as he was.
Then Nakula, for believing nobody was as good-looking — which is a small and completely devastating detail. Of all the things to be disqualified from paradise for.
Then Arjuna, who promised to destroy every enemy in a single day and did not, and who privately rated every other archer alive as scenery.
Then Bhima, for eating too much and for being vain about his strength. Bhima gets the news about himself from his brother's back, which feels about right.
Each time, Yudhishthira answers plainly and keeps walking. He does not stop, he does not look back, and the epic is unusually insistent on this. It is not presented as coldness. It is presented as the whole point: he is the only one who has already put everything down.
He answers every question about his dying family without breaking stride. It is either the finest thing he ever does or the coldest, and the epic declines to tell you which.
Only Yudhishthira and the dog reach the top.
The door policy
Indra turns up in person with a chariot. Get in, he says. You are going to heaven in this body, awake, without dying first. Nobody has ever been offered this.
Yudhishthira asks after his brothers and his wife. Gone ahead, says Indra. Already there. Don't worry about what they left on the mountain.
Fine, says Yudhishthira. The dog comes too.
Indra explains, patiently and reasonably, that there is no provision for dogs in heaven. Dogs are ritually impure. They contaminate offerings. This is simply not how it is done.
And then comes the most unexpected sentence in the Mahabharata, delivered by a man standing at the summit of everything he has ever been promised: in that case, I'm not coming.
It is not a bluff, and he does not argue it on sentiment. He argues it on law, which is very much his style. Abandoning someone who is devoted to you and has placed himself under your protection is a sin on the order of killing a brahmin. The dog followed him. That makes the dog his.
Indra pushes back, and his argument is genuinely strong: you walked past your own wife's body without stopping. You left four brothers on the ice. And now heaven itself is on the table and the sticking point is a dog?
Yudhishthira's answer is roughly this. They were dead. There was nothing left that I could do for them. This one is alive, and it is standing here.
The dog is Dharma. His own father, in disguise, for the second time — the first was the yaksha at the lake, years earlier, when Yudhishthira answered a hundred riddles to get his brothers back.
Dharma does not appear to him as a moral dilemma or a battlefield. He appears as something small and filthy and inconvenient that will not stop following him.
The last test, which is worse
You would think that was the ending. It is not.
He arrives in heaven, and the first person he sees — radiant, enthroned, perfectly comfortable — is Duryodhana.
His brothers are not there. Draupadi is not there. Karna is not there.
He asks where they are, and is told: the other place.
So he asks to be taken there, and the road down is foul in ways the text describes at unnecessary length. In the dark he hears voices. They are his brothers, and Draupadi, and Karna, and they are asking him not to leave, because the air changes when he is near.
He tells the gods to go back without him. He is staying.
That is the test. The whole thing dissolves. It was an illusion the entire time. Duryodhana's moment in heaven was the standard reward for dying honourably in battle, and Yudhishthira's moment in hell was the price of one lie — the half-truth he told Drona about Ashwatthama being dead, when the Ashwatthama in question was an elephant.
He gives up paradise twice in one afternoon, once for a dog and once for his brothers, and both times he does it without arguing with himself first.
Why this is the right ending
Yudhishthira's life is a long sequence of moral problems he gets wrong slowly and with enormous deliberation. He is called the dharma raja, and he is also the man who staked his wife at dice. He is the one who told the lie that killed his own teacher. Nobody in the epic thinks harder and lands worse.
And then, at the gate, with the largest prize ever offered to anybody, he gets it right instantly and at no apparent cost.
He does not weigh it. He does not consult. Something small and loyal is standing next to him, he is not leaving it behind, and that is the end of the discussion.
The test you pass is almost never the one you prepared for. He spent a lifetime on the enormous questions and failed most of them. The one that counted was a dog at a gate, and it took him about four seconds.
At the very end of the Mahabharata, Yudhishthira is offered heaven in his own living body and turns it down because the stray dog that followed him up the mountain is not allowed in. The dog is Dharma, in disguise, running one last test — and it is the only one Yudhishthira ever passes without thinking about it.