In the Hindu History of Mahabharata, Yudhishtira (Sanskrit: युधिष्ठिर, IAST: Yudhiṣṭhira) is the eldest son of King Pandu and Queen Kunti and the king of Indraprastha and later of Hastinapura (Kuru). He was the leader of the successful Pandava side in the Kurukshetra War. At the end of the epic, he was the only one among his brothers to ascend to heaven with his mortal body. Later, he had to experience a hell for his half-lie spoken during the 15th day of the war. He was also blessed with the spiritual vision of second sight by a celestial Rishi as a boon.
The word Yudhishthira means "the one who is steady in the war", from the words, yuddha (युद्ध) meaning 'war', and sthira (स्थिर) meaning 'steady'. His other names are-
Once a Brahmin rishi, Kindama and his wife were enjoying nature in the forest when Yudhishthira's father Pandu accidentally shot at them, mistaking them for deer. Before dying, Kindama cursed the king to die when he engages in intercourse with any woman. Due to this curse, Pandu was unable to become father. As an additional penance for the murder, Pandu abdicated the throne of Hastinapura, and his blind brother Dhritarashtra took over the reins of the kingdom.
After knowing the curse of Pandu, Kunti told him that he could be the father of the child and told her boon of sage Durvasa. Then Pandu requested Kunti to apply her boon and suggested to call Dharma to get a truthful, knowledgeable and justice knowing son who can rule Hastinapur. On the full moon of May (Sanskrit: Jyeshth masa) first and the eldest of the Pandavas, Yudhishthira was born.
Yudhishthira's four younger brothers were Bhima, (born by invoking Vayu); Arjuna, (born by invoking Indra); and the twins Nakula and Sahadeva (born by invoking Aśvins). If Karna, the son of Kunti born before her marriage by invoking Surya is counted, Yudhishthira would be the second-eldest of Kunti's children.
Yudhishthira was trained in religion, science, administration and military arts by the Kuru preceptors, Kripa and Drona. Specifically, he became a master in using the spear and war chariot. It is said that his spear was so strong that it could penetrate a stone wall as though it were a piece of paper. His chariot always flew at a 4 finger distance above the ground due to his piety.
After the Yudhishthira and his brothers had completed their studies, they returned to Hastinapura. Duryodhana along with Shakuni planned to kill them and sent Yudhishthira, his siblings and his mother to a palace made of lac, called Lakshagriha. One night, Shakuni's man, Purochana set fire. However, princes and their mother survived. They were heartbroken and decided to hide from Hastinapura. Later, Arjuna attended Draupadi's swayamvar and won her hand in marriage. But due to Kunti's misunderstanding, Draupadi became the common wife of all the Pandavas. Later at Indraprastha, Draupadi bore Yudhishthira a son, Prativindhya. Although Yudhishthira had another wife named Devika, Draupadi was his chief consort as well as the empress. 
Yudhishthira was married to Devika in a self-choice marriage ceremony, arranged by her father Govasena, who was the king of Sivi Kingdom. They had a son, Yaudheya. According to Puranas, Yaudheya was also the name of the son of Prativindhya. The Bhagavata Purana, as well as Vishnu Purana, also mention Pauravi as one of the wives of Yudhishthira. A son named Devaka was born to this couple.
When Pandavas returned to Hastinapura after hiding, there was conflict between Yudhishthira and Duryodhana regarding as the crown prince of Hastinapura. Yudhishthira was originally made the crown prince of Hastinapura, but after the event of Lakshagriha, people thought that he was dead, and Duryodhana was made the new crown prince of Hastinapura. On Bhishma's advice, Dhritarashtra gave half of the kingdom to Pandavas to rule. However the land was under the control of Takshaka. Pandavas defeated Takshaka and with the help of Mayasura, they built a magnificent city named Indraprastha.
Arjuna, Bhima, Nakula, and Sahadeva led armies across the four corners of the world to obtain tributes from all kingdoms for Yudhishthira's sacrifice. The non-compliant Magadha king, Jarasandha was defeated by Bhima and Krishna. At his sacrifice, Yudhishthira chose Krishna as his honoured guest. At the yajna, many kings were present there, including Duryodhana and Shishupala. Shishupala was beheaded by Krishna for his evil deeds. An annoyed and jealous Duryodhana returned to Hastinapura.
Yudhishthira was challenged to play a game of dice in Hastinapura by his cousin, Duryodhana. He invited him, because he was jealous of Yudhishthira's wealth and power after he witnessed at the Rajasuya. Shakuni used the dice made from the bones of his father, which always ensured that he got the number he wanted and Yudhisthira was allowed to bet whatever he had he was proud of and had right over. After losing his brothers and his empire, he bet himself and also his wife which lead to the Vastraharan. Later, he lost all his kingdom in the game again and was forced into exile for 13 years, which included one year in anonymity.
During their exile, the 4 other Pandavas happened upon a lake, which was haunted by a Yaksha. The Yaksha challenged the brothers to answer his moral questions before drinking the water; the four Pandavas laughed and drank the water anyway. As a result, they choked on the water and died. Yudhishthira went in last, answered many questions put forth to him by the Yaksha and revived his brothers. He asked for any other wish as he was impressed and told him he could ask for wealth, strength, power, anything he wished. Yudhishthira said he already got the strength, wealth and power when all his four brothers were revived and said he could not ask for any other wish. Sahadeva said if you do not use this wish, we might be in trouble in the future. Arjuna knowing that his brother Sahadeva knows the future told Yudhishthira to ask another wish. Bhima and Nakula also knew that Sahadeva and Arjuna were very smart and told him to use his wish. Later Yama, his father told him to ask for a wish. Yudhishthira said, "Asking for 1 or 2 boons is not being greedy but asking for 3 or more boons is being greedy and it is one of the gravest sins. My brothers are insisting me to ask for a wish and the person who is ready to give me a boon, my father also wants me to ask for another boon. I do not ask for being the wealthiest man nor being the most powerful man. All I ask is that me, my brothers and Draupadi should not be recognized during the 13th year of exile."This story is often cited as an example of Yudhishthira's upright principles. The Yaksha later identified himself as Yudhishthira's father, Dharma and pointed them to the kingdom of Matsya to spend their last year in exile anonymously.
Along with his brothers, Yudhishthira spent his last year of exile in the kingdom of Matsya. He disguised himself as a Brahmin named Kank (among themselves Pandavas called him Jaya) and taught the game of dice to the king.
When the period of exile was completed, Duryodhana refused to return Yudhishthira's kingdom. Yudhishthira made numerous diplomatic efforts to retrieve his kingdom peacefully but in vain. He was convinced by Krishna to wage war.
The flag of Yudhishthira's chariot bore the image of a golden Moon with planets around it. Two large and beautiful kettle-drums, called Nanda and Upananda, were tied to it. Before the war started, Yudhisthira stepped down from his chariot to take blessings firm his grandsire Bhishma, teachers Drona and Kripa and uncle Shalya, who all were in his opposite side in the war showing his respect towards his elders. He also asked the willing Kauravas to join his side. On his request one of Dhritrasthara sons, Yuyutsu joined the war on the side of Pandavas.
Yudhishthira was described to be an excellent car-warrior and a master at spear-fighting. Yudhishthira defeated many warriors in the War, such as Srutayudha, Dronacharya, Duryodhana, and Karna. He killed Madra king Shalya and his brother on the 18th and final day on the War.
After getting victory in the war, Yudhisthira was crowned as the Emperor of Hastinapura for 36 years. He performed Ashwamedha on Krishna and Vyasa's insistence. 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 Bharat Varsh.
Upon the onset of the Kali-yuga and the departure of Krishna, Yudhishthira 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, accompanied by a dog, made their final journey of pilgrimage to the Himalayas. Among the Pandavas and Draupadi, one-by-one died on the way to reach the top, starting from Draupadi. Finally, it was Yudhisthira who was able to reach the top, with the dog accompanying him.
On reaching the top, Indra asked him to abandon the dog before entering the Heaven. But Yudhishthira refused to do so, citing the dog's unflinching loyalty as a reason. Indra said he let his family die, but Yudhishthira said he could not prevent their deaths, but to abandon a poor creature was a great sin. It turned out that the dog was his god-father Dharma Deva in disguise.
After he was made aware that Karna was his elder brother, Yudhishthira cursed all women with not being able to hide any secrets. Had Yudhishthira's mother Kunti not kept that fact a secret, the war might have been averted, with millions spared.
He was master in spear-fighting and chariot racing. Yudhishthira was a polyglot, knowing unusual languages. He was known for his honesty, justice, sagacity, tolerance, good behavior and discernment.
Dhritarashtra said to Sanjaya "The son of Kunti and Pandu, Yudhishthira, is virtuous and brave and eschews deeds that bring on shame. Endued with great energy, he hath been wronged by Duryodhana. If he were not high-minded, they would in wrath burn the Dhritarashtras. I do not so much dread Arjuna or Bhima or Krishna or the twin brothers as I dread the wrath of the king, O Suta, when his wrath is excited. His austerities are great; he is devoted to Brahmacharya practices. His heart's wishes will certainly be fulfilled. When I think of his wrath, O Sanjaya, and consider how just it is, I am filled with alarm."
Yudhishthira acquired deep spiritual knowledge from Lord Shiva and many prominent sages including Vyasa, Parashurama, Bhrigu, Savarni Manu, Narada, Markandeya, Asita Devala and Dhaumya. (Mahabharata Sabha Parva Section 77).
Being an important person in epic Mahabharata, Yudhisthira's role has been enacted by various actors over the years.