The inscription on the north-western and southern walls of a hoary hill temple states that, the district was known as Thiruvaraikkal in the ancient times. This sublime city is ruled by Atikula King, Gunasila. Later, Hoysalas took control over the region and ruled this city till the 14th century. After the Hoysala rule came the Vijayanagar Empire and ruled this region till 1565. Then by the year 1623 Madurai Nayaks took over the throne and worked hard for the development of the city. During their rule Namakkal met lots of good changes and many forts were built. Then this area was successively ruled by Muslim Sultans of Bijapur and Golkonda, Mysore kings and then the Marathas.
After independence, on the eve of 25 July, 1996, Namakkal district was separated from Salem district. It officially started functioning independently from 1 January 1997. Since then Namakkal topped as the one of the best economically stable cities in Tamilnadu.