After Hanuman brought the new that Sita had been held captive by Ravana at Lanka, Sri Rama proceeded towards Lanka with a huge army. After receiving the seashore he faced the problems of crossing over the sea.
Sri Rama made a Parthiva linga of Shiva and worshipped it. Lord Shiva became very please with him and appeared. He blessed Sri Rama to be victorious. Sri Rama on the other hand, requested him to establish himself in that Parthiva linga, to which lord Shiva agreed. This way
‘Ramaeshwar jyotirlinga’ came into existence.