Kochi was the centre of Indian spice trade for many centuries, and was known to the Yavanas (Greeks and Romans) as well as Jews, Syrians, Arabs, and Chinese since ancient times.
It rose to significance as a trading centre after the port Muziris around Kodungallur (Cranganore) was destroyed by massive flooding of Periyar in 1341.
The earliest documented references to Kochi occur in books written by Chinese voyager Ma Huan during his visit to Kochi in the 15th century as part of Admiral Zheng He's treasure fleet.
There are also references to Kochi in accounts written by Italian traveller Niccolò Da Conti, who visited Kochi in 1440.

On the Malabar coast during the early 15th century, Calicut and Kochi were in an intense rivalry, so the Ming dynasty of China decided to intervene by granting special status to Kochi and its ruler known as Keyili (可亦里) to the Chinese.
Calicut had been the dominant port-city in the region, but Kochi was emerging as its main rival.
For the fifth Ming treasure voyage, Admiral Zheng He was instructed to confer a seal upon Keyili of Kochi and enfeoff a mountain in his kingdom as the Zhenguo Zhi Shan (鎮國之山, Mountain Which Protects the Country).
Zheng He delivered a stone tablet, inscribed with a proclamation composed by the Yongle Emperor himself, to Kochi.
As long as Kochi remained under the protection of Ming China, the Zamorin of Calicut was unable to invade Kochi and a military conflict was averted.
The cessation of the Ming treasure voyages consequently had negative results for Kochi, as the Zamorin of Calicut would eventually launch an invasion against Kochi.
In the late 15th century, the Zamorin occupied Kochi and installed his representative as the king of the port-city.

According to many historians, the precursor state to Kingdom of Kochi came into existence in the early 12th century, after the fall of the Chera Kingdom.
The reign of the Kingdom was hereditary, and the family that ruled over the region was known as the Perumpadappu Swaroopam in the local vernacular.

Portuguese navigator, Pedro Álvares Cabral founded the first European settlement in India at Kochi in 1500.
From 1503 to 1663, Fort Kochi (Fort Emmanuel) was ruled by Portugal.
This Portuguese period was a harrowing time for the Saint Thomas Christians and the Jews, as the Inquisition was active in Portuguese India.
Kochi hosted the grave of Vasco da Gama, the first European explorer to set sail for India, who was buried at St. Francis Church until his remains were returned to Portugal in 1539.
The Portuguese rule was followed by that of the Dutch who renamed Fort Immanuel as Fort Stormsburg.
In meantime, the Royal Family of Kochi relocated the capital of Kochi Kingdom to Thrissur, leaving nominal authority over Islands of Kochi.
In 1664, Fort Kochi Municipality was established by Dutch, making it the first municipality in Indian subcontinent, which got dissolved when Dutch authority got weaker in the 18th century.
The remaining part of Kochi were governed by governors of Kochi Kingdom.
By 1773, the Mysore ruler Hyder Ali extended his conquest in the Malabar region to Kochi forcing it to become a tributary of Mysore.
The hereditary Prime Ministership of Kochi held by the Paliath Achans ended during this period.

Meanwhile, the Dutch, fearing an outbreak of war on the United Provinces, signed the Anglo-Dutch Treaty of 1814 with the United Kingdom, under which Kochi was ceded to the United Kingdom in exchange for the island of Bangka, east of Sumatra.
However, there are evidences of English habitation in the region even before the signing of the treaty.
In 1866, Fort Kochi municipality was reinstalled and its first Municipal Council seating contest was conducted in 1883.
In 1896, H.H. Rama Varma XV, The Maharaja of Cochin, initiated local administration by forming town councils in Mattancherry and Ernakulam.
In 1907, the Governor of the Madras Presidency, Sir Arthur Lawley and his brother, Beilby Lawley, 3rd Baron Wenlock, Governor of Madras, 1891 to 1896, left for an official tour of Cochin and Travancore, which lasted from 25 Janu
Kochi was the centre of Indian spice trade for many centuries, and was known to the Yavanas (Greeks and Romans) as well as Jews, Syrians, Arabs, and Chinese since ancient times. It rose to significance as a trading centre after the port Muziris around Kodungallur (Cranganore) was destroyed by massive flooding of Periyar in 1341. The earliest documented references to Kochi occur in books written by Chinese voyager Ma Huan during his visit to Kochi in the 15th century as part of Admiral Zheng He's treasure fleet. There are also references to Kochi in accounts written by Italian traveller Niccolò Da Conti, who visited Kochi in 1440.
On the Malabar coast during the early 15th century, Calicut and Kochi were in an intense rivalry, so the Ming dynasty of China decided to intervene by granting special status to Kochi and its ruler known as Keyili (可亦里) to the Chinese. Calicut had been the dominant port-city in the region, but Kochi was emerging as its main rival. For the fifth Ming treasure voyage, Admiral Zheng He was instructed to confer a seal upon Keyili of Kochi and enfeoff a mountain in his kingdom as the Zhenguo Zhi Shan (鎮國之山, Mountain Which Protects the Country). Zheng He delivered a stone tablet, inscribed with a proclamation composed by the Yongle Emperor himself, to Kochi. As long as Kochi remained under the protection of Ming China, the Zamorin of Calicut was unable to invade Kochi and a military conflict was averted. The cessation of the Ming treasure voyages consequently had negative results for Kochi, as the Zamorin of Calicut would eventually launch an invasion against Kochi. In the late 15th century, the Zamorin occupied Kochi and installed his representative as the king of the port-city.
According to many historians, the precursor state to Kingdom of Kochi came into existence in the early 12th century, after the fall of the Chera Kingdom. The reign of the Kingdom was hereditary, and the family that ruled over the region was known as the Perumpadappu Swaroopam in the local vernacular.
Portuguese navigator, Pedro Álvares Cabral founded the first European settlement in India at Kochi in 1500. From 1503 to 1663, Fort Kochi (Fort Emmanuel) was ruled by Portugal. This Portuguese period was a harrowing time for the Saint Thomas Christians and the Jews, as the Inquisition was active in Portuguese India. Kochi hosted the grave of Vasco da Gama, the first European explorer to set sail for India, who was buried at St. Francis Church until his remains were returned to Portugal in 1539. The Portuguese rule was followed by that of the Dutch who renamed Fort Immanuel as Fort Stormsburg. In meantime, the Royal Family of Kochi relocated the capital of Kochi Kingdom to Thrissur, leaving nominal authority over Islands of Kochi. In 1664, Fort Kochi Municipality was established by Dutch, making it the first municipality in Indian subcontinent, which got dissolved when Dutch authority got weaker in the 18th century. The remaining part of Kochi were governed by governors of Kochi Kingdom. By 1773, the Mysore ruler Hyder Ali extended his conquest in the Malabar region to Kochi forcing it to become a tributary of Mysore. The hereditary Prime Ministership of Kochi held by the Paliath Achans ended during this period.
Meanwhile, the Dutch, fearing an outbreak of war on the United Provinces, signed the Anglo-Dutch Treaty of 1814 with the United Kingdom, under which Kochi was ceded to the United Kingdom in exchange for the island of Bangka, east of Sumatra. However, there are evidences of English habitation in the region even before the signing of the treaty. In 1866, Fort Kochi municipality was reinstalled and its first Municipal Council seating contest was conducted in 1883. In 1896, H.H. Rama Varma XV, The Maharaja of Cochin, initiated local administration by forming town councils in Mattancherry and Ernakulam. In 1907, the Governor of the Madras Presidency, Sir Arthur Lawley and his brother, Beilby Lawley, 3rd Baron Wenlock, Governor of Madras, 1891 to 1896, left for an official tour of Cochin and Travancore, which lasted from 25 Janu
Kochi