KURUKSHTHRA WAR and DHARMAPUTHRA
There are many passages in the Mahabharata in which you will see Yudhisthira arguing against fighting a bloody war for the sake of a kingdom, but Krishna justifies the war as moral and as the unavoidable duty of all moral warriors.
Yudhisthira and his brothers were favored by the Kuru elders like Bhishma, Vidura, Kripa and Drona over Duryodhana and his brothers, the Kauravas, due to their devotion to their elders, pious habits and great aptitude in religion and military skills, and for having the necessary qualifications for the greatest of the kshatriya order.
In the war, the Kuru commander Drona was killing thousands of Pandava warriors. Krishna hatched a plan to tell Drona that his son Ashwathama had died, so that the invincible and destructive Kuru commander would give up his arms and thus could be killed. The plan was set in motion when Bhima killed an elephant named Ashwathama, and loudly proclaimed that Ashwathama was dead. Drona, knowing that only Yudhisthira, with his firm adherence to the truth, could tell him for sure if his son had died, approached Yudhisthira for confirmation. Yudhisthira told him: "Ashwathama has died". However Yudhisthira could not make himself tell a lie, despite the fact that if Drona continued to fight, the Pandavas and the cause of dharma itself would have lost and he added: "naro va kunjaro va" which means he is not sure whether elephant or man had died. Krishna knew that Yudhisthira would be unable to lie, and had all the warriors beat war-drums and cymbals to make as much noise as possible. The words "naro va kunjaro va" were lost in the tumult and the ruse worked. Drona was disheartened, and laid down his weapons. He was then killed by Dhristadyumna.
Due to his piety, Yudhisthira's feet and his chariot do not touch the ground, to symbolize his purity. When he spoke his half-lie, Yudhisthira's feet and chariot descended to the ground.
After the war of Kurukshetra, Yudhisthira performs the funeral rites of all his people including Karna. He was deeply hurt that many of his men were killed. His mother Kunti came and said she tried to inform Karna of his relationship with Yudhisthira and persuade him to give up his enmity. Even the Sun god also spoke to Karna but because of his friendship with Duryodhana, he did not change his position. Kunti revealed that Karna was her son, and one of them. So basically, it was only after Karna (who was pretty impressive in everything he did) was killed, that the mother of Pandavas revealed about him to the other five sons. This revelation by Kunti made the Pandavas angry and depressed Yudhishthira a lot.
Yudhisthira thought that Karna should have had the same right and respect as the other five brothers. He was very upset that his own mother had kept a huge secret from him and the others. He could not contain his anger and cursed the entire woman race with not being able to hide any secrets.
Yudhisthira performed the tarpana ritual for the souls of the departed. Upon his return to Hastinapura, he was crowned king of both Indraprastha and Hastinapura. Out of his piousness, Yudhisthira retained Dhritarashtra as the king of the city of Hastinapura, and offered him complete respect as an elder, despite the misdeeds of his dead sons. Yudhisthira later performed the Ashwamedha yagna (sacrifice) to re-establish the rule of dharma all over the world.
Upon the onset of the Kali yuga and the death of Krishna, Yudhisthira and his brothers retired, leaving the throne to their only descendant to survive the war of Kurukshetra, Arjuna's grandson Parikshit. Giving up all their belongings and ties, the Pandavas made their final journey to pilgrimage in the Himalayas.
While climbing the peaks, one by one Draupadi and each Pandava in reverse order of age fell to their deaths, dragged down by the weight of their guilt of few, but real sins. But Yudhisthira reached the mountain peak, because he was unblemished by sin or untruth. The true character of Yuddhisthira is revealed at the end of the Mahabharata. On the mountain peak, Indra, King of Gods, arrived to take Yudhisthira to heaven in his Golden Chariot. As Yudhisthira was about to step into the Chariot, the Deva told him to leave behind his companion dog, an unholy creature not worthy of heaven. Yudhisthira stepped back, refusing to leave behind the creature who he had taken under his protection. Indra wondered at him - "You can leave your brothers behind, not arranging proper cremations for them...and you refuse to leave behind a stray dog!"
Yudhisthira replied, "Draupadi and my brothers have left me, not me [them]." And he refused to go to heaven without the dog. At that moment the dog changed into the God Dharma, his father, who was testing him and Yudhisthira had passed with distinction.
Yudhisthira was carried away on Indra's chariot. On reaching Heaven he did not find either his virtuous brothers or his wife Draupadi. Instead he saw Duryodhana and his evil allies. The Gods told him that his brothers were in Naraka (hell) atoning their little sins, while Duryodhana was in heaven since he died at the blessed place of Kurukshetra.
Yudhisthira loyally went to Naraka (hell) to meet his brothers, but the sights and sounds of gore and blood horrified him. Tempted to flee, he mastered himself and remained on hearing the voice of his beloved brothers and Draupadi calling out to him, asking him to stay with them in their misery. Yudhisthira decided to remain, ordering the Divine charioteer to return preferring to live in hell with good people than in a heaven of evil ones. At that moment the scene changed. This was yet another illusion to test him on the one hand, and on other hand to enable him to atone for his sin of using deceit to kill Drona. Indra and Krishna appeared before him and told him that his brothers were already in Heaven, along with his enemies, for earthly virtues and vices don't hold true in heavenly realms. Krishna yet again hailed Yudhisthira for his dharma, and bowed to him, in the final defining moment of the epic where divinity bowed down to humanity.