He invited Hanuman to his hermitage and offered him food. Hanuman refused the food and drink and went to take a bath in the nearby pond, where a crocodile seized him; he dragged the animal out of water and killed him. But from the dead body there arose a love Apsara, who had become a crocodile because of the curse of Daksha. The Apsara told Hanuman to be cautious of Kalanemi. Thereby Hanuman came to know the identity of the disguised demon.
He went straight to Kalanemi and seizing him by his feet, he whirled him round and threw him with such a force that he fell before the throne of Ravana. In the Puranas, his previous life has been mentioned. He was an Asura and son of Virochana, the grandson of Hiranyakashipu. He was killed then by Vishnu, but was said to live again in Kansa and Kaliyuga.
References :
1. Kohli, Surindar Singh (ed), Dictionary of Mythological References in Guru Granth Sahib, 1993