Director A. L. Vijay revealed that Madrasapattinam was supposed to happen later in his career, but the intervention of producer Kalpathi S. Aghoram helped realize the viability of the film earlier. Vijay had first explored the script in his college days and drew inspiration from an English professor who "used to talk to us about the freedom movement a lot," furthering Vijay's interest in history. He visualized the people who lived in the pre-independence period of India and explored the concept of how it would have been if an English girl fell in love with an Indian boy, laying the foundations for the script. The script took six months to write, with leading Tamil writer Prapanchan and visits to see independence veterans being helpful in understanding the history of the city of Madras between 1945 and 1947.
