The answers of this question clearly says that any person who dies in Varanasi will get moksha.
If a sinner dies in Varanasi, will that person get moksha?
Hinduism Stack Exchange is a question and answer site for followers of the Hindu religion and those interested in learning more about Hinduism. It only takes a minute to sign up.Sign up to join this community
Any one who dies in Varanasi will get moksha. I am posting a passage that describes Sri Ramakrishna's experience in Benares.
The party entered holy Benares by boat along the Ganges. When Sri Ramakrishna's eyes fell on this city of Siva, where had accumulated for ages the devotion and piety of countless worshippers, he saw it to be made of gold, as the scriptures declare. He was visibly moved. During his stay in the city he treated every particle of its earth with utmost respect. At the Manikarnika Ghat, the great cremation ground of the city, he actually saw Siva, with ash covered body, and tawny matted hair, serenely approaching each funeral pyre and breathing into the ears of the corpses the mantra of liberation; and then the Divine Mother removing from the dead their bonds. Then he realized the significance of the scriptural statement that anyone dying in Benares attains salvation through the grace of Siva.
The Gospel of Sri Ramakrishna translated by Swami Nikhilananda, Introduction
Not all sinners will get moksha directly although they die in Varanasi. Some has to become Pisacha and they will get liberated afterwards.
But it should be noted that no one who dies in Varanasi will born again including living animals.
Sinners, in this context, can be divided into two kinds: Sinners who committed their sins at Varanasi and sinners who committed their sins elsewhere. Those who committed sins elsewhere can get liberation directly. But, sinners who committed sins at Varanasi will become a Pisacha, thereby hell and finally attains moksha. It has been told by Siva to Uma.
The lord who bore the crescent moon on his forehead recounted the greatness of the holy centre:—‘‘O goddess of Devas, the greatness of Avimukta cannot be recounted by me in detail. This holy centre is honoured by the sages. O fair lady, how shall I tell you in detail the merits of Avimukta ?
Sinners who die here shall be liberated even in their very birth. A man dispels at Varanasi the sins he has committed elsewhere. The sins committed at Varanasi turn the sinner into a Pisaca and they lead him to hell. It is better for men to court Pisacahood after committing thousands of sins at Varanasi than to attain the position of Indra a thousand times in heaven without the pleasure of being in the city of Kasi. No living animal is reborn if it dies in this place where the lord Visvesvara, the lord of Omkara,the lord clad in elephant’s hides, is ever present.....