Yudhisthira's father Pandu, the king of Hastinapura, soon after his marriage accidentally shot a Brahmin and his wife, mistaking them for deer, while the couple were making love. Before he died, the Brahmin cursed the king himself to die at once, the minute he engaged in intercourse with one of his two wives. Due to this curse, Pandu was unable to father children. In additional penance for the murder, Pandu also abdicated the crown to his blind brother Dhritarashtra.
Yudhisthira therefore was conceived in an unusual way. His mother, Queen Kunti, had in her youth been granted the power to invoke the Devas by Rishi Durvasa. Each god, when invoked, would place a child in her lap. Urged by Pandu to use her invocations, Kunti gave birth to Yudhisthira by invoking the Lord of Righteousness, Dharma. Being Pandu's eldest son, Yudhisthira was the rightful heir to the throne. However, this claim was contested by the Dhritarashtra's son, Duryodhana.
Yudhisthira's four younger brothers were Bhima, (born by invoking Vayu); Arjuna, (born by invoking Indra); and the twins Nakula and Sahadeva, (born by invoking the Ashwini Gods). If Karna, the son of Kunti born before her marriage by invoking Surya is counted, Yudhisthira would be the second-eldest of five Pandava brothers.
Yudhisthira was trained in religion, science, administration and military arts by the Kuru preceptors Kripa and Drona. He was a master of the spear weapon, and a maharatha, capable of combating 10,000 opponents all together at a time.
Yudhisthira is also known as Bharata (Descendent of the line of Bharata) and Ajatashatru (One Without Enemies).
Yudhisthira's true prowess was shown in his unflinching adherence to satya (truth) and dharma (righteousness), which were more precious to him than any royal ambitions, material pursuits and family relations.
Yudhisthira rescued Bhima from Yama, and all of his four brothers from death by exemplifying not only his immense knowledge of dharma but also his very own way of understanding the finer implications of dharma, as judged by Yama, who was testing him in the guise of a Crane and a Yaksha.
Yudhisthira's dharma was markedly distinct from that of other righteous kings. He married Draupadi along with his four brothers, he had Bhima marry an outcast Rakshasi, he termed "prayer" as "poison", he saw an uneventful life with no credit and a belly full of food at the end of the day as happiness, he denounced casteism, saying a Brahmin is known by his actions and not his birth or education--thus portraying the real changeable dharma, the dharma that modifies itself to suit the times.
Due to his piety, Yudhisthira's feet and his chariot do not touch the ground, to symbolize his purity.
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 all the necessary qualifications for the greatest of the kshatriya order.
Yudhisthira married the Panchali princess Draupadi, who bore him his son Prativindya.
When the Pandavas came of age, King Dhritarashtra sought to avoid a conflict with his sons, the Kauravas, by giving Yudhisthira half the Kuru kingdom, albeit the lands which were arid, unprosperous and scantily populated, known as Khandavaprastha.
But with the help of Yudhisthira's cousin Krishna, a new city, Indraprastha, was constructed by the Deva architect Viswakarman. The Asura architect Mayasura constructed the Mayasabha, which was the largest regal assembly hall in the world. Yudhisthira was crowned king of Khandavaprastha and Indraprastha. As he governed with absolute piousness, with a strict adherence to duty and service to this people, his kingdom grew prosperous, and people from all over were attracted to it.
Yudhisthira performed the Rajasuya sacrifice to become the Emperor of the World. His motives were not to obtain power for himself, but to establish dharma and defend religion all over the world by suppressing the enemies of Krishna and sinful, aggressive kings.
Arjuna, Bhima, Nakula and Sahadeva led armies across the four corners of the world to obtain tributes from all kingdoms for Yudhisthira's sacrifice. At his sacrifice, Yudhisthira honored Krishna as the most famous and greatest personality. This incensed Sisupala, who proceeded to hurl several insults at Krishna and the Pandavas for selecting a "cowherd" for the great honor. When Sisupala's transgressions exceed the hundred pardons that Krishna had promised his mother, Krishna summons the sudarshana chakra to behead him. Following which, the yajna is completed successfully.
Yudhisthira was unable to refuse when Duryodhana's maternal uncle Shakuni, challenged him to a game of dice. Thanks to Shakuni's cheating, Yudhisthira lost each throw, eventually gambling away his kingdom, his wealth, his brothers and finally his wife. Owing to the protests of Vidura, Bhishma and Drona, Dhritarashtra returned all these losses. However, Shakuni challenged Yudhisthira one more time, and Yudhisthira once more lost. This time, he, his brothers and his wife were forced to discharge the debt by spending thirteen years in exile, with the condition of anonymity in the last year, in the forest before they could reclaim their kingdom.
Yudhisthira was criticized by Draupadi and Bhima for succumbing to temptation and playing dice, an art he was absolutely unskilled at, making the Pandavas prey to Shakuni and Duryodhana's evil designs. Yudhisthira reproached himself for weakness of mind, but at the time he argued that it was impossible to refuse a challenge of any nature, as he was a kshatriya and obliged to stand by the kshatriya code of honour.
During the thirteen years, he was repeatedly tested for staunch adherence to religious values in face of adversity.
The conditions of the debt required the Pandavas to disguise themselves and not be discovered during the last year of exile. Yudhisthira learned dice play from Narada Muni and assumed the guise of a brahmin courtier and dice player in the Matsya Rajya of king Virata.
When the period of exile was completed, Duryodhana and Shakuni nevertheless refused to return Yudhisthira's kingdom. Yudhisthira made numerous diplomatic efforts to retrieve his kingdom peacefully; all failed. To go to war to reclaim his birthright would mean fighting and killing his own relatives, an idea that appalled Yudhisthira. But Krishna, Yudhisthira's most trusted advisor (whom he recognized as the Avatara of Vishnu, the Supreme Godhead, Brahman), pointed out that Yudhisthira's claim was righteous, and the deeds of Duryodhana were evil. If all peace efforts failed, war was therefore a most righteous course. There are many passages in the Mahabharata in which Yudhisthira's will to fight a bloody war for the sake of a kingdom falters, but Krishna justifies the war as moral and as the unavoidable duty of all moral warriors.
In the war, the Kuru commander Drona was killing of 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.
When he spoke his half-lie, Yudhisthira's feet and chariot descended to the ground. However, Yudhisthira himself killed Shalya, the king of Madra and the last Kuru commander.
At the end of the war, Yudhisthira and the Pandava army emerged victorious, but Yudhisthira's children, the sons of Draupadi, and many Pandava heroes like Dhristadyumna, Abhimanyu, Virata, Drupada, Ghatotkacha were dead. Millions of warriors on both sides were killed.
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 Dhristarashtra as the king of the city of Hastinapura, and offered him complete respect and deference as an elder, despite his misdeeds and the evil of his dead sons.
Yudhisthira later performed the Ashwamedha yagna (sacrifice) to re-establish the rule of dharma all over the world. In this sacrifice, a horse was released to wander for a year, and Yudhisthira's brother Arjuna led the Pandava army, following the horse. The kings of all the countries where the horse wandered were asked to submit to Yudhisthira's rule or face war. All paid tribute, once again establishing Yudhisthira as the undisputed Emperor of 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 Parikshita. Giving up all their belongings and ties, the Pandavas made their final journey of 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.