There have been references to Mayiladuthurai in the works of the 7th century Saivite saint Sambandar. The Thanjavur Nayak king Raghunatha Nayak constructed mandapams in Mayiladuthurai. During the 17th and 18th centuries AD, Mayiladuthurai was ruled by the Thanjavur Marathas who invited Brahmins from the Telugu, Kannada and Maratha countries to settle in the region and gave large amounts of land to them. In 1799, Mayiladuthurai, was ceded to the British East India Company, along with the rest of the Thanjavur Maratha kingdom, by the Thanjavur Maratha ruler Serfoji II.
Mayiladuthurai prospered under British rule emerging as an important town in Tanjore district. Carnatic musicians Madurai Mani Iyer and Gopalakrishna Bharathi and Samuel Vedanayagam Pillai, who wrote the first Tamil novel Prathapa Mudaliar Charithram were born in Mayiladuthurai while Tamil writer Kalki Krishnamurthy M.S.Udhaya Moorthy studied at the Municipal High School in Mayiladuthurai. When the Tanjore district was trifurcated in 1991, Mayiladuthurai was transferred to the newly formed Nagapattinam district.