Early of history of Anniyur remains unclear, but the rock scripts of the two oldest temples shows this village's status in the 12th century. Anniyur was one of the part of Thondai Naadu which was ruled by cholas and later by pallavas. The two temples are important landmarks of Anniyur. The Vishnu temple was built by the minister of Krishna Devaraya named as Bethanna and the Shiva temple was built by the pallavas. The rock pillar which was laid before the Vishnu temple is 30 feet high, and it was made from a single rock.