Jaya and Vijaya were the gate keepers of Vaikunt  ( Lord Vishnu’s Palace), where they served Lord Vishnu whole with love and Bhakti.

One day four Bal Rishies came to Vaikunt to have Darshna (vision) of Lord Vishnu, these gate keepers stopped them at the gate of Vaikunt saying that Lord Vishnu is taking rest. The Enraged Rishies cursed them to take birth of Demons for this offense.  Saying this the Rishies disappeared , the guards cried and prayed their mater, Lord Vishnu to protect them form such a bitter curse. They did not  want to leave Vaikunt , how could they stay away from their Lord. Lord Vishnu said that he can not undo the curse given by Maha Rishies, but he can give them option either to be his enemy for 3 births or to be his devotee for 14 births, and then return to Vaikunt lok. Jaya and Vijaya could not stay away from Lord Vishnu for 14 births so they opted to return Vaikunt in 3 births  and agreed to have birth as Demons.

.Because of this curse Jaya and Vijaya took births as Ravan and Kumbhkarna. They also took birth as Hiranyakashipu and Hiranyaksh.