There is an interesting legend associated with the origin of the temple. It is believed that the idol of Lord Vishnu consecrated here is the very idol worshiped by Sathyabhama, the consort of Lord Krishna at Dwaraka in the Mahabharata Era more than 5,000 years ago. One day it so happened that she failed to notice her husband standing nearby as she was immersed in performing Pooja to the idol. The Lord, furious, kicked the idol off the pedestal. It flew into the nearby sea, when its right hand was broken. Time and tide took the idol to the Kannur sea belt off Dwarka. A fisherman happened to net it. It being a precious catch, he presented it to King Valabhan, the Kolathiri King ruling over the area in that period.
The king had constructed a temple, Kadalayi, in a village about 6 km (3.7 mi) north of Kannur and was on the lookout for an idol to be consecrated there. The astrologers understood the sanctity of the idol and confirmed that the idol, though its hand was broken and thus deformed, was worthy of consecration. The idol was thus consecrated at Kadalayi. When the temple was ruined due to the devastating onslaught of time a new temple was built at Chirakkal 180 years ago and the old idol re-consecrated. The temple, though situated at Chirakkal, is still referred to by its old name, Kadalayi.