Devayani was the daughter of Shukracharya, the guru of
Asuras (demons). Kacha was the son of Brihaspati, Guru of Devas (celestial
beings). Their love story is mentioned in the Mahabharata.
Shukracharya used to bring the dead Asuras back to life
using the Mritsanjeevani Mantra. The Devas suffered huge losses in battles due
to this.
Devas decided that someone should learn the
Mritsanjeevani Mantra. Kacha volunteered to help the Devas.
Kacha became a student of Shukracharya. The demons were
against this but still Shukracharya agreed to make Kacha his student.
But Shukracharya never discussed Mritsanjeevani Mantra with
his student.
To achieve his goal, Kacha made Devayani to fall in love
with him.
Shukracharya was happy as his daughter had found a husband
who was a deva.
When Kacha was killed by Asuras, Shukracharya used the
mantra to bring him back for his daughter. Finally, Kacha learned the mantra.
After learning the mantra, Kacha left without marrying
Devayani.
She then cursed him that what he learned would not be of use
to him. Kacha cursed her back that no deva would marry her.