Yudhisthir was born through an unique manner. Yudhisthir's father Pandu was bestowed upon with a curse by a brahmin that he (Pandu) shall die the moment he tries to touch his partner. Pandu was cursed for having killed a Brahmin who was mating with his wife, mistakening him for a deer. Disappointed Pandu along with his two wives Kunt iand Madri left the kingdom and led a life of celibacy. Since Pandu has the urge to have children, Kunti revealed a secret to her husband about a boon that was granted to her by sage Durvasa long back. According to the boon, Kunti could call upon any god and seek a child through them without pregnancy. In this manner Kunti uttered the mantra and first invoked the Lord of Righteousness and thus gave birth to Yudhisthir. This is the reason why Yudhisthir is also known as Dharmaraja. The Lord of righteousness also passed down the characteristic of righteousness to Yudhisthir.
Yudhisthir had four more younger brothers namely, Bheem, Arjun, Nakul and Sahadev. Yudhsithir was different from the other kings of his time. He abolished casteism. He also made his brother Bheem to marry an 'outcast' Rakshasi thus setting an example that concepts such as caste is fruitless. He denounced casteism, saying a Brahmin is known by his actions and not his birth or education. This proved that Yudhisthir was ahead of his times.
King of Indraprastha
After the death of Pandu and Madri due to a curse, Kunti along with the five sons came to reside in Hastinapura. During that time, Dhritarashtra was the king of Hastinapura. He was ordered by his elders to be fair with both Kunti and the five children. Dhritarashtra wanted his eldest son Duryodhan to ascend the throne after his death. But lawfully it was Yudhisthir who was the successor to the throne.
When Dhritarashtra announced Yudhisthir as the next King, his son Duryodhan was left frustrated and angry. To avoid more hurdles, Dhritarashtra on advice from Vidhura, Bhishma and other wise men decided to divide the Kigdom into two. Dhritarashtra gave the arid, barren land to the Pandavas while keeping the prosperous, fertile land for his own sons.
However, in spite of being given such a land, Yudhisthir with the help of his brothers converted it into a beautiful and prosperous city called 'Indraprastha'. The Asura architect Mayasura constructed the Mayasabha, which was one of the largest regal assembly hall in the world.
The Rajasuya sacrifice
Yudhisthir performed the Rajasurya sacrifice in order to become the world's emperor. However, the motive of the sacrifice was not to seek power or fame but to instill Dharma in the earth, which was fast loosing on Dharma. 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 this sacrifice Yudhisthir honored Lord Krishna as being one of the most strong personality on the earth.
When the news of the beauty of Indraprastha reached everywhere, Duryodhana out of curiosity visited the city himself. While entering the palace, he mistook water for a floor and fell into it. On seeing this Draupadi (wife of the Pandavas) burst into laughter and exclaimed that the son of a blind man can only be blind. This enraged Duryodhan who on reaching Hastinapura, schemed a game against the Pandavas with the help of his uncle Shakuni.
Shakuni invited the Pandavas for a friendly game of dice. The dice was made with Shakuni's father's thighbones. Initially, Shakuni let Yudhisthir to win few matches. Later on, using his skills; Shakuni begin to defeat Yudhisthir in the game. The game had turned into such a prestigious issue that Yudhisthir didn't even mind keeping his kingdom, brother and his wife Draupadi on stake.
When he lost everything that he had, to his cousins, the Kauravas forced him and his brothers and wife to go on a thirteen years exile. They were also ordered to not come in the purview of the society and lead a life of anonymity.
The Kurukshetra battle
On returning from the thirteen exile, Yudhisthir asked for his kingdom, but Duryodhan and Shakuni were not ready to return it back. He tried to talk it out several times with them, but to no avail. Yudhisthir tried his best to avoid any sort of violence as it involved killing of his relatives. However, Krishna (whom Yudhisthir considered his main adviser) convinced him to fight the battle, as it was a righteous one.
During the battle, Dhrona was the commander in chief of Kauravas. He was invincible and undefeatable. He had already killed at least many Pandavas troupe. This was when Krishna hatched up a plan. In order to make Dhrona weak, Bheem killed an elephant called Ashwatama. Ironically, Dhrona's son's name was Ashwatama. Hence, when Bheem on killing the elephant announced that Ashwatama was killed, Dhrona could not believe his ears. To confirm this news he went up to Yudhisthir who he knew would adhere to truth. Yudhisthir, unable to lie gave a diplomatic answer that; he did not know whether the elephant or his son was dead. On hearing this, Dhrona became weak and dropped down his arms. Dhristadyumna later on killed him.
This was perhaps the first time when Yudhisthir had lied.
An exemplarary king
After winning the battle, Yudhisthir performed the tarpana ritual for the peace of the souls who had sacrificed their lives in the battle. He was crowned the king of both Hastinapura and Indraprastha. However, due to his righteous nature, he allowed Dhritarashtra to rule Hastinapura and treated him with reverence and respect.
He also became the unbeatable emperor of the world and tried to instill Dharma in 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 ties and belongings, the Pandavas made their last trip of piligrimage in the Himalayas. During the piligrimage one by one all the Pandavas and Draupadi died. However, due to his unblemished and righteous nature Yudhisthir reached the peak of the moutain.
The test of righteousness
On reaching Himalayas, Yudhisthira was carried away on Indra's chariot. But on reaching the heaven he found Duryodhan and his evil allies rather than his brothers and wife. On enquiring as to where are his brothers and wife, he was informed that they were in the hell for having committed some sins and that the Kauravas were in the heaven as they had died on the holy land of Kurukshetra. When Yudhisthir went to the hell to see his brothers and wife as well as for committing the sin of decieting Dhrona, he could hear their voices pleading him to stay with them. In spite of seeing so much gory visuals in the hell, Yudhisthir decided to stay in the hell rather than to go to the heaven filled with evil people, and told the charioteer to go away. At this moment, Indra and Krishna appeared before him and told him that his brothers were already in Heaven, along with his enemies. Saying this Krishna bowed down to Yudhisthir for his righteous nature.
This incident stands as a testimony for the righteous nature of Yudhisthir even after death.