According to a legend mentioned in Kashi Khand when during Padma Kalp there was a severe drought all across the world, then all creatures were severly afflicted by it. So, when Lord Brahma came to know about this he became worried as it was difficult for him to see his creation being on the verge of destruction. After a long search for a solution, Lord Brahma saw King Ripunjay who was dedicatedly engrossed in the penance. Being pleased by him, Lord Brahma renamed him to King Divodas and requested him to take the world under his throne and save the humanity. King agreed with this but he had one condition that he wanted to rule peacefully without intervention, so that he could reform the dharma without any disturbance. Therefore, he wished that all Gods and Godly entities should remain in the heaven only and should not return to land. Lord Brahma also kept a condition that King should be an excellent administrator and that every person staying in his kingdom or visiting his kingdom should be treated well with proper religious pursuits. King agreed.
On the command of Lord Brahma, all Gods left to the heaven. But, it was not easy for Lord Brahma to ask Lord Shiva to leave Kashi and go to heaven as Kashi is believed to be one of the favorite places of Lord Shiva. So, when Lord Shiva appeared in front of Madaranchal being pleased with his prayers and Mandaranchal asked Lord Shiva to reside upon him along with Goddess Parvati and his family as a boon, finding right time to aware Lord Shiva about King Divodas’ condition, Lord Brahma told how King Divodas can save humanity and about King’s condition that all gods should leave to heaven. As Lord Shiva could not deny the request of Lord Brahma, so he also left to Mandaranchal from Kashi. As per his condition, King Divodas took the throne and worked vigorously to bring order in the decaying world. With the favours obtained from Lord Brahma, king established a rule so flawless that was never seen before. Under his regime, his subjects prospered and justice flourished.
As the time passed, Lord Shiva desired to again come back to his own city Kashi. But due to Brahma’s boon to Divodas, he was unable to set feet in Kashi. Soon Lord Shiva came to know that other gods too are unable to stay in Kashi. Not happy with this kind of attitude of the Divodas, Lord Shiva decided first to cast some dents into the flawlessness of Divodas’ rule in order to reduce his powers and then to end his regime. For this purpose, Lord Shiva sent Yoginis and various gods to Kashi. But when Suryadev and Yoginis were failed to find out the loop holes in the kingdom of Raja Divodas and Lord Ganesha too got delayed in doing so, then Lord Shiva requested Lord Vishnu to go to Kashi and evict the King from his throne. Thereafter, Lord Vishnu left for Kashi and established himself as an idol on Ganga-Varuna Sangam near Padodak Teerth in the form of Adi-Keshav and left towards the North Direction of Kashi and reached Dharm Kshetra along with Goddess Laxmi and Garun. As they all reached there, Lord Vishnu transformed himself into fascinating Buddha saint,Goddess Laxmi into wanderer (Pravrajika) and Garud into a wise Buddha Pupil. After transforming themselves, they all started misleading and misguiding the citizens of Divodas’ Kingdom. As a result, they all succeeded in misleading the civilians of Kingdom. Pravrajika (transformed form of Goddess Laxmi) spread the profanity and misconduct across the city. In this way King Divodas got depressed and worried about his kingdom and citizens. Meanwhile, Lord Vishweshwar Dhundhiraj succeeded in controlling citizen of king’ kingdom with his Maaya Jaal. After getting downhearted, when king Divodas got to know that after 18 days a Audichya Brahmin is arriving in the city the King got excited. After 18 days Lord Vishnu himself arrived in the city of Divodas in the form of Brahmin. King Divodas welcomed the Brahmin with hospitality and asked him for the solution of his problem. In reply Lord Vishnu appreciated the qualities, good deeds etc. of King and his tenacity. Then Lord Vishnu told Divodas that he has committed a big mistake by dislodging Lord Vishweshwar from the Kashi, which has resulted the occurrence of such situation. He asked Divodas to establish a Shivalinga in Kashi if he wants a solution. Along with this, he also told the King that after seven days from establishing the Shivalinga, Viman of Lord Shiva will come and take him to the heaven (Swarglok). When all things got sorted Lord Vishnu established himself at Panchnad Teerth in Kashi to bless his devotees.
In Kashi, Lord Vishnu is established in eighteen forms. All these forms of Lord Vishnu are included in Kashi Vishnu Yatra. Following are the names of the forms of Vishnu in which he is established in Kashi:-