The Yaksha Prashna, also known as the Dharma Baka Upakhyana or the Akshardhama, is the story of a question-and-answer dialogue between Yudhishthira and a yaksha in the Hindu epic Mahabharata. It appears in the Vana Parva, and the story is set as the Pandavas end their twelve years of exile in the forest.
At the end of their 12 years of exile in the forests, the time had come for the pandavas to live incognito in Agyat Vasa. As they were discussing their course of action the princes met a Brahmin who complained that a deer has taken on its antlers his arani— a pair of wooden blocks used to start fire by friction— so he couldn't light the fire for Vedic rituals. So, the pandavas set out to retrieve the Brahmin's arani and followed the hoofprints of the deer.
While following the mysterious deer, Yudhishthira became exhausted and thirsty. So, his brother Nakula set out to fetch water and found a beautiful lake. The lake was devoid of any living creature, except for a crane. When he attempted to take water from the lake, the crane spoke, "O Nakula! The water of this lake will turn into poison if you take it without satisfactorily answering my questions." Nakula ignored the crane, hastily drank the poisonous water, and died. Nakula's twin Sahadeva came in search of his brother and found the same lake, saw Nakula dead, and was warned by the crane. But Sahadeva too ignored the crane and died after drinking the water. One after the other, Arjuna and Bhima met the same fate.
When none of his brothers returned with water, Yudhishthira followed the trail to the lake and found the all lying dead. Before searching for his brothers' killer, he decided to drink some water from the lake. But when the crane warned him, he realised that the crane held the answer to the turn of events, and agreed to answer its questions. The crane then revealed itself as a Yaksha. The Yaksha asked Yudhishthira approximately 125 questions on gods, metaphysics, philosophy, and similar topics.
Yudhishthira had answered all questions in a satisfactory manner, but the Yaksha only allowed him to choose one of his brothers to be restored to life. Yudhishthira chose his younger half-brother, Nakula, the son of his stepmother Madri, reasoning that his own mother, Kunti, had a living son regardless, but his stepmother Madri did not.
The Yaksha was impressed by how Yudhishthira followed dharma in every little thing he did. Yaksha revealed himself to be Yama-Dharma, the god of death, who was also Yudhishthira's father. He revealed to that it was he who had disguised himself as a deer and stolen the arani. He blessed Yudishthira, him saying since he had adhered to dharma (righteousness), the dharma would protect the pandavas and no-one would recognise them during the Ajnata Vasa. All of the pandavas were restored to life.
This dialogue between Yudhishthira and the Yaksha is found in the Madhya Parva of the Mahabharata, and is also known as the Dharma-Baka Upakhyan, or Legend of the Virtuous Crane.