As per Hindu legend, Shiva is believed to have relieved Kampa (quaking) of a king haunted by evil spirits on account of the king killing a Brahmin by mistake. This led to the name of Kampahareshvara. As per another legend, Shiva is believed to have assumed the form to quench the fury of Narasimha, an avatar of Vishnu.