Here is the story of demon Namuchi and Mangalagiri Panakala Lakshmi Narasimha Swamy.
The Lord that has established himself on the hill is in the form of Narasimha (man-lion) which Lord Vishnu assumed to kill Hiranyakasipu, a rakshasa father of Prahlada, a great devotee. He is also called as Sudarsana Narasimhaswamy. The legend says that Namuchi, a Rakshasa after great penance obtained a boon from Brahma that he would not be killed by anything that is either wet or dry. He began to harass Indra and the Devathas.
Encouraged and supported by Lord Vishnu, Indra commenced destroying the army of Rakshasa Namuchi, who did in a cave in Sukshmakaram (small size) giving up his sthulakaram (Physical manifestation). Indra dipped Sudarsanam, the disc of Lord Vishnu in the foam of the ocean and sent it into the cave.
Lord Vishnu manifesting himself at the centre of the disc destroyed the Pranavayuvu (life breath) of the Rakshasa with the fire of his exhalation. He thus got the name of Sudarsana Narasimha. The blood that flowed from the body of the Rakshasa seemed to have formed into a pool at the foot of the hill which is known hill. The Devathas themselves were unable to withstand the fire of the anger of the Lord and they prayed for appeasement.
The Lord took amrutam (nectar) and cooled down. It was in Krithayugam. The Lord said that he would be satisfied with ghee in Threthayugam, with milk in Dwaparayugam and with panakam(Jaggery water) in Kaliyugam. Hence the Lord is called in Kaliyugam as Panakala Lakshmi Narasimhaswamy.