Maharshi Kashyapa and his wife, Diti, had three children: Hiranyaksha, Hiranyakashipu, and Holika, who were the first of the race of daityas (meaning "children of Diti")—powerful beings often considered demons.
Hiranyaksha and Hiranyakashipu were avatars of Jaya and Vijaya—the gatekeepers of Vaikuntha (the abode of Lord Vishnu)—born as demon twins on Earth in the Satya era as a result of the Kumaras' curse. Though they were twins, Hiranyakashipu is regarded as the elder of the two as he was born first. After they grew up, Hiranyakashipu and Hiranyaksha ruled over the demons. One day, Hiranyaksha stole the Earth and submerged her in the cosmic ocean. Vishnu assumed his Varaha (Boar) avatar to kill Hiranyaksha and rescue the Earth. When Hiranyakashipu learned of his younger brother's death, he vowed revenge against Vishnu.
Kayadhu, Hiranyakashipu's wife, informed him she was pregnant. Following the advice of Shukracharya, the guru of the demons, Hiranyakashipu decided to pray to Lord Brahma for immortality. He entrusted his Prime Minister, Vidal, with Kayadhu’s care during his absence.
Terrified at the prospect of Hiranyakashipu pleasing Brahma and becoming immortal, Indra and the other gods tried to disturb his penance. Agni, the fire god and deity of sacrificial rituals, attempted to burn Hiranyakashipu, but Shukracharya thwarted his efforts. Then Varuna, the rain god and ruler of the celestial waters, unleashed a torrential downpour on the demon, but Shukracharya again saved his disciple. Indra, the king of the gods, then attempted to kill Hiranyakashipu himself, but his efforts also proved futile against Shukracharya’s powers.
Frustrated, Indra decided to target Hiranyakashipu’s unborn son instead. He ordered Agni to burn the innocent baby, but Lord Vishnu intervened and saved the child.
Indra stormed into Hiranyakashipu's palace to abduct his wife, Kayadhu. Entrusted with her safety, Prime Minister Vidal fought Indra but perished at his hands. Indra then carried Kayadhu away, planning to imprison her and kill her son upon birth. However, Narada, the divine sage of the gods, intercepted Indra and convinced him that his actions were immoral. He persuaded Indra to release Kayadhu and took her to his ashram.
Brahma finally appeared before Hiranyakashipu and asked him to make a wish. Hiranyakashipu first wished for immortality, but Brahma declined, saying that every creature born must eventually die.
Hiranyakashipu then wished that he would be killed:
neither by a human nor by an animal,
neither on the earth nor in the sky,
neither inside nor outside a house,
neither during the day nor night,
and not with a weapon.
Brahma granted this boon, and Hiranyakashipu believed himself invincible, though Brahma knew a loophole lay hidden within the conditions. Empowered by his newfound protection, Hiranyakashipu declared himself God and demanded worship.
Upon returning to his palace, he discovered that Kayadhu was missing. Shukracharya informed him of what had transpired. Furious, Hiranyakashipu stormed the heavens, defeated Indra’s army, and demanded to know his wife’s whereabouts. Narada informed him that Kayadhu was staying at his ashram.
Narada escorted Hiranyakashipu to his ashram, where he reunited with Kayadhu. She expressed her desire to give birth to her child in the ashram.
Kayadhu soon went into labor and gave birth to a son. Narada named the boy Prahlada and requested that Kayadhu and Prahlada remain at his ashram for a while longer. Hiranyakashipu agreed.
At the ashram, Prahlad grew into a handsome young boy, and Narada taught him about Lord Vishnu. Eventually, Narad advised Prahlada and Kayadhu to return to Hiranyakashipu’s palace, where they received a warm welcome.
Shukracharya then took Prahlada to his ashram to train him in the ways of the demons. However, Prahlada refused to recognize Hiranyakashipu as God and continued to worship Vishnu. He also refused to learn combat, believing martial arts predisposed the soul toward violence. The teachers at the ashram soon deemed him a bad influence on the other demon students.
Prahlada’s unwavering devotion to Vishnu enraged Hiranyakashipu, who despised Vishnu for slaying his brother. Furious, he ordered his soldiers to hurl Prahlada from the top of a cliff. They obeyed, but Vishnu intervened and saved Prahlada. When Prahlada returned unharmed, Hiranyakashipu imprisoned him and had deadly poison mixed into his food. However, Lord Shiva nullified the poison’s effects, and Prahlada survived once again.
Hiranyakashipu’s sister, Holika, had been granted a boon that rendered her immune to fire. She attempted to use this boon to kill her nephew by sitting with him in her lap on a burning pyre. However, since she used her power for evil, the boon failed, and she was burned alive while Prahlada emerged unscathed. Holika’s burning is commemorated annually as Holi, the Hindu festival of colors, symbolizing the triumph of good over evil.
Hiranyakashipu, now blaming Vishnu for his sister’s death, became even more enraged. He resolved to kill Prahlad himself.
"Prahlada, where is your Lord Vishnu? If he is everywhere, why is he not present before me in this pillar?" he asked.
"He is in the pillar, just as in the slightest dust," Prahlada calmly replied.
Unable to contain his fury, Hiranyakashipu struck the pillar with his mace.
A deafening sound followed, and from the shattered pillar emerged a creature with the body of a man and the face and claws of a lion. It was Narasimha, an avatar of Vishnu, who was neither human nor animal. He seized Hiranyakashipu and placed him on his lap (neither on the earth nor in the sky) at the threshold of the courtyard (neither inside nor outside a house) at twilight (neither day nor night). Then, using his claws (not a weapon), Narasimha disemboweled Hiranyakashipu. Thus, Brahma’s boon was not violated.
After his father’s death, Prahlada was crowned king of the demons. Unlike his predecessors, he ruled with wisdom and justice.