Ghantakarna was a devotee of lord Shiva and hater of Lord Vishnu. He eventually realised the error of his ways and obtained grace at the hands of Lord Krishna.
Ghantakarna hated Lord Vishnu so much that he used to hang bells on his ears to prevent even hearing his name
I am the pishacha named ghantakarna, terrible to see. I eat flesh. I am deformed and terrible like another real death. I am coming from the great mountain kailasa served by ghosts (shiva's servants). I have the form of a pishacha who perform sinful deeds. I have been hating Vishnu always by hanging bells (=ghanta) on my ears (= Karna), thinking that the name of vishnu shall not enter my ears.
- 80, Bhavishya parva, Harivamsa.
He worshipped Lord Shiva asking for Moksha. Shiva refused saying that only Lord Vishnu can grant moksha to him
Entering the mountain kailasa, I met the lord having bull as his flag (shiva). Then I always worshipped and praised the great deva, shiva. Then Hara (shiva) was pleased with me and he asked me to accept a boon. Then I prayed for liberation in presence of the great lord, shiva. The lord with three eyes, shiva, told me who prayed for liberation: Vishnu is the only one who provides liberation for one and all. There is no doubt. Hence you go to badari, to the hermitage of nara and Narayana and worshipping the one who excites men, obtain liberation from govinda there. When the lord of lords, the one who holds the trident (shiva) told me thus, I realized the knowledge that, govinda, the one having garuda on his flag (Vishnu), is considered as the most superior.
- 80, Bhavishya parva, Harivamsa.
Concentrating his mind and bowing to keshava, affectionate to the devotees, the terrible pishacha, recited this mantra: i bow to the Lord Vasudeva, the one who resides in the inside of all, the one who holds the chakra. I bow to lord Vasudeva, the one who holds the mace, the one with intellect. AUM! I bow to Narayana, Vishnu, the splendorous Vishnu. O keshava! Let my mind be purified by praising you. Now let me not have a terrible, sorrowful birth like this again. O the Lord of senses! Let me become the messenger of gods by remembering you. Let my body be destroyed by the striking of your chakra and thus let me not have any connection with the worldly existence. O lord! This is my prayer.
O lord of gods! In happiness, sorrow, passion as well as eating and moving as also in waking and dream, everywhere, let my mind be happy in you. O the one who excites men! I bow to you.
- 80, Bhavishya parva, Harivamsa.
Lord Krishna was pleased by Ghantakarna’s devotion and showed him the divine Vaishnava form
O the lord of earth! Then the Lord of the universe (Krishna, Vishnu) showed him, who was not another, his own soul (form) in the pure inner mind of the pishacha. Then the terrible pishacha saw keshava (Krishna, Vishnu), Hari, in his own soul, wearing yellow, silk clothes, having eyes as beautiful as the lotus flower, having dark blue colour. The Lord Vishnu was holding the conch, chakra, garland and the mace. He was wearing a crown. He was wearing kaustubha and his chest was decorated with the auspicious mark, shrivatsa. The most desirable Lord having the colour of a dark blue cloud, was mounted on garuda. He looked like the god of wind. He was having four arms, speaking auspicious words. The lord was still, all pervading and auspicious. The eternal Lord was having neither beginning nor the end. The lord of illusion was not having any illusion (the vision was real), always yoked with truth and purity. The Lord, approachable with intellect was always without any impurity. Seeing the Lord of the universe, Vishnu, in his mind many times, the pishacha, without opening his eyes, considered himself to be the one who has achieved what is to be achieved.
- Chapter 81, Bhavishya Parva, Harivamsa
Ghantakarna was filled with devotion and worshipped Krishna again
Here is the one who holds the chakra, arrows, the bow Sharanga and the mace in his hands, who rides the chariot having a flagstaff and a quiver, the one with thousand heads, the Lord of all gods, the one who delivered the universe, the one who is the abode of the universe. Here is Vishnu, here is the conqueror (Jishnu), the Lord of the universe, the ancient lord, the best among the purushas, the soul of the world, the creator of the world, here is the eternal lord.
The lord of the universe is the one to be worshipped first - So say the wise. He is the constituent of all, He is the unborn lord, the origin of all. He is the subtle (minute) of the subtle, the most fundamental measure. (At the same time) hari, Vishnu is the gross of the gross. All this (world) is fixed in the lord. On destruction, all this world goes to the lord. All the world was born from him. That lord is standing here.
The one who has seen hari in the real form, his deleiverance is in his hands. To him, hari in the real form is appearing here. is sure that I have gathered merit in my other births before. It is Due to the outcome of that merit, I am seeing the lord here.
- 82, Bhavishya parva, Harivamsa.
The Lord Krishna purified Ghantakarna with his touch
Then lord Vishnu, hari who liberates from sins, touched the limbs all over the terrible pishacha, softly with his hand. Then his form immediately became splendorous and handsome like the form of the god of desire. His hair became curly and long. His arms became long. His eyes became beautiful. His fingers and nails became equal and his mouth became leveled and his nose became high. His eyes became beautiful as lotus flowers. He became splendorous with the colour of a lotus flower. His hair became beautiful and decorated with ornaments.
He could sing like a gandharva and he became accomplished as a siddha because Vishnu caressed him softly with his hand. Definitely, such a form was never seen even with the passage of time. Even now the sages are unable to get such a form (after performing penances). O the best among kings! (janamejaya! Vaishampayana continued) After performing many terrible and severe penances, the pishacha was able to get that form. O king! (janamejaya! Vaishampayana continued) Who will suffer among those who depend on the lord of universe? (None will suffer ever.) He will have good everywhere who meditates on Janardana, speaks about him and chants his name always. O the lord of earth! (janamejaya! Vaishampayana continued) What will he not have?
- 83, Bhavishya parva, Harivamsa.
Lord Krishna sent Ghantakarna to live in heaven, promising him liberation at the end of the Manvantara
Then the lord told him who was standing like another god of desire “You shall have un-decaying stay in heaven till the time indra is there. According to my order, you shall live in heaven till then and not anywhere else. When shakra perishes, then you shall leave heaven and have communion with me. Till the time of indra, your younger brother will also stay in heaven.”
Then ghantakarna went to heaven, as ordered by keshava.
- 83, Bhavishya parva, Harivamsa.