The modern history of the town is interwoven with the history of Travancore. The modern town of Nagercoil grew around Kottar, now a locality within the muncipal limits. The town came into prominence during and after the reign of Maharaja Marthanda Varma, the king of erstwhile Travancore, the capital of which was Padmanabhapuram, about 20 km to the north of Nagercoil. The capital was later shifted to Thiruvananthapuram (Trivandrum), the present capital of Kerala state, about 65 km to the north of Nagercoil. In the Travancore state, from the reign of Marthanda Varma up until India's independence from Britain and Travancore's annexation, Nagercoil was the second most important town in the state, after the capital Trivandrum.
Foreign colonial powers, most notably the Dutch, tried colonizing the areas around Nagercoil and Colachel during the 18th century, but were subdued. The Dutch East India Company(also known as Verenigde Oostindische Compagnie or VOC), with a keen eye on the spices of Travancore, tried to establish a trading post at the then important port town of Colachel, near Nagercoil. In the Battle of Colachel in 1741, a Dutch naval fleet under the command of Captain Eustance De lennoy gained control of the lands from Colachel to Nagercoil, but was subsequently defeated by the Travancore forces under the great king Maharaja Marthanda Varma.
Maharaja Marthanda Varma initiated the process of reforms in various sections of government, especially in the land, revenue, literacy, social and trade departments. His successors continued the reforms on the same stride. Though Travancore was considered by many to be a 'Hindu' administration, the rulers generally had religious tolerance, were not hostile to European educators, missionaries and traders. Though the king of Travancore helped the people of this land they restricted women to wear dress to cover up their chest and there was a revolt against the king and it was called as "Saree Revolt". The king of Travancore tried to subdue the Nadars the dominant caste people in this district, but during earlier times there was a revolt against this, under the leadership of "Muthukutty" who later formed the "Ayya Valli". The district got its freedom from the aggression of the former Travancore after much political fight under the leader of "Marshall Nesamony" in the year 1956 in the free india as the Kanyakumari district has a majority of Tamil speaking population. The district joined with the state of Tamil Nadu.
Until the 19th century, the coffers of Travancore were greatly helped by revenues from the trade of pepper and other spices with the European powers.
Infrastructure like Irrigation systems (an excellent system is still found around Nagercoil), dams, roads, schools etc. developed under the able administration of the Travancore regents and their Dewans. The British in India called Travancore a 'model native state'. At the time, Travancore was the most socially developed and one of the most economically developed states under the British Raj.
During the time of the British Raj in India, Travancore was essentially a vassal to the British, but the British never interfered in the general administration of the Travancore regents.
At the time of India's independence from Britain, the then Dewan of Travancore, Sir C.P. Ramaswamy Aiyer, preferred Travancore to be a sovereign country, but eventually gave up after a tough stand by Sardar Vallabhai Patel, India's federal minister in charge of home affairs. Sir C.P. Ramaswamy Aiyer is still kept in high esteem in Nagercoil, for the many projects and developments that took place during his tenure.
When the states in India were re-organized in the 1950's, under the States Reorganisation Act, the then Government of Kerala gave Kanyakumari district to Tamilnadu (because majority of the population spoke Tamil in the district) in exchange for Palghat district from Tamilnadu.
Nagercoil has generally been a communally peaceful place, though there was some tension and violence between the Christian and Hindu communities in the 1980's. Since then, inter-religious meetings organised by various religious faiths and by District Collectors (local administrators) have helped in a good understanding between the various sections of the population.