As per the Legends, King Dasrath was ruling the entire world. Once Sani had to pass Rohini star after staying in Krithika for some time. Rishi Vasishta and other Sages told Dasaratha to stop this transfer as it will bring Severe drought for every 12 years. King Dasaratha with his weapons went on his chariot to stop Sani. Dasaratha made several attempts to stop Sani but all his attempts went Vain. He requested Sani Bhagawan not to pass through Rohini Star for the sake of the world. Impressed Sani Bhagawan, granted his two requests and told Dasarath to take a bath at Thirunaraiyur Temple tank so that he would appear before him. As instructed, Dasarath took the holy bath and offered prayers. Saneeswarar appeared before him and blessed him.
From them on Sani takes 30 years to go around Sun. It is said that Rama along with Anjaneya offered prayers at this temple on their way back to Ayodhya.