Jaya and Vijaya were the Gatekeepers at Vaikuntha, the abode of Lord Vishnu. The gatekeeperes were called Dwara Paalakas. Dwara is gateway in Sanskrit and the keepers (Security) were called Dwara Paalakas.
One day, the four sages, Sanaka, Sanatana, Sanandana and Sanatkumara, who were called collectively as the Sanatkumaras, came to visit Lord Vishnu at Vaikuntha. They were greatly learned men and were very wise. Though they were great sages, they appeared like young children.Vaikuntha had seven gates. The Seventh gate was guarded by Jaya and Vijaya.
The sages approached the entrance but were stopped by Jaya and Vijaya who did not let them go in. “The Lord is resting” said one , ” He cannot be disturbed”, said the other. Both of them laughed mockingly at the sages since they looked like children and wore only a loin cloth.
The sages were greatly enraged. They told Jaya and Vijaya that Lord Vishnu would be readily available for any devotee any time and that they wanted to see Him at once. Jaya and Vijaya refused to listen to the sages and the sages cursed them that they would be born with lust, anger and greed on the earth and thereby be separated from the Lord.
Just as the curse was pronounced, Lord Mahavishnu appeared at the doorway and his gatekeepers pleaded with the Lord to relieve them of the curse. The Lord said that he did not have the power to lift the curse but could modify the curse. He asked them, “Do you wish to be born as my ardent devotees for seven lives or my staunch enemy for three lives? The choice is yours”
Jaya and Vijaya could not bear the thought of being separated from the Lord for seven lifetimes and so unanimously decided on the second option.
And so, they were born on earth as Hirayakashipu and Hiranyaksha in the Satya Yuga, Ravana and Kumbhakarna in the Treta Yuga and Shishupala and Dantavakra (who were Allies of Jarasandha who in turn was the father in law of Kamsa) and they hated the Lord in all the three births only to be killed by Him in His Varaha Avatara(Hiranyaksha), Narasimha Avatara (Hiranyakashipu), Rama Avatara (Ravana and Kumbhakarna) and Vasudeva Krishna Avatara ( Shishupala and Dantavakra)
Jaya and Vijaya, after thus serving their curse went happily back to duty at Vaikuntha to be with the Lord forever.
This is the story of Jaya and Vijaya.