Story of the palace of wax is found in the Adi Parva of the Mahabharat. It is an important turning point in the relationship between the Pandavas and Kauravas in the Mahabharata.
Both Kaurava and Pandava princes lived in Hastinapura. Pandavas was liked by the citizens due to their conduct and exemplary character. This evoked jealousy in Duryodhana and the other Kaurava brothers. They saw the five Pandava brothers as a threat to their ambitions.
Kauravas decided to kill the Pandavas through deceit. With the consent of Dhritarashtra, they built a place at Varanavata. Dhritarashtra asked Kunti and the Pandavas to attend a festival dedicated to Shiva at Varanavata and stay in the newly built palace.
Purochana, minister of Duryodhana, went along with the Pandavas.
Vidura, uncle of Pandavas, came to know that the palace was built of wax and the aim of the Kauravas was to burn the palace and kill the Pandavas and their mother.
Pandavas pretended they had no knowledge of what was happening. The five brothers built a tunnel from the palace to the forest.
One day evening, a huntswomen and her five children came to the palace in a drunken state and stayed in the palace.
Bhima, the second of the Pandavas, attacked Purochana and killed him.
Bhima then set the palace on fire on that night and he Pandavas escaped through the tunnel.
The huntswoman and her children were killed in the fire. The charred bodies of them were mistaken to be that of the Pandavas.