As per the legend, this Sivalinga was owned by the Rakshasa King Tarakasura. No one could win over him due to the power of this Sivalinga. In the war between deities and Taraka, Kumaraswamy and Taraka were face to face. Kumaraswamy used his Sakthi aayudha to kíll Taraka. By the power of Sakti aayudha the body of Taraka was torn into pieces. But to the astonishment of Lord Kumaraswamy all the pieces reunited to give rise to Taraka. Kumaraswamy repeatedly broke the body into pieces and it was re-unified again.
Lord Kumaraswamy was confused and was in an embarrassed state then Lord Srimannarayana appeared before him and said "Kumara! Don't get depressed, without breaking the Shiva lingham worn by the asura you can't kíll him" you should first break the Shiva lingam into pieces, then only you can kíll Taraka Lord Vishnu also said that after breaking, the shiva lingham also will try to unite. To prevent the Linga from uniting all the pieces should be fixed in the place where they fall by worshipping them and building temples on them.
By taking the word of Lord Vishnu Lord Kumaraswamy used his Aagneasthra (weapon of fire) to break the Shiva lingham worn by Taraka. The Shiva lingham broke into five pieces and was trying to unite by making Omkara nada (Chanting Om). Then Surya deva by the order of Lord Vishnu fixed those five pieces of Shiva linga and worshipped them by building temples over them. By the formation of temple the pieces stopped their movement and were famous of panchrama kshetras. All the five Shivalinga in these five places have got scaly marking as them which are believed to be formed by the power of Agneyasthra used by Lord Kumaraswamy.
According to legend, these five pieces were installed as Sivalingas at five different temples by Indra, Surya, Chandra, Vishnu and Kumaraswamy at the respective places. These places (or Aaramas) are as follows:
Amararama (located in Amaravathi)
Draksharama (located in Draksharamam)
Somarama (located in Bhimavaram)
Ksheerarama (located in Palakol)
Kumararama (located in Samalkota)