The coastal settlement of Cascais originated in the 12th century, depending administratively on the town of Sintra, located to the north. In its humble beginnings, Cascais lived from the products of the sea and land, but already in the 13th century, its fish production served the capital Lisbon, located nearby. During the 14th century, the population increased to the outside of the walls of its castle. Its prosperity led to the administrative independence from Sintra in 1364. The village and its surroundings were owned by a feudal lord; the most famous of them was João das Regras (died 1404), a lawyer and professor of the University of Lisbon that was involved in the ascension of King John I to power as the first King of the House of Aviz.
Since the Middle Ages, Cascais lived from fishing, maritime commerce (it was a stop for ships sailing to Lisbon), and from agriculture, producing wine, olive oil, cereals, and fruits. Due to its location close to the Tagus estuary, it was also seen as a strategic post in the defence of Lisbon. Around 1488, King John II built a small fortress in the village, located by the sea. This medieval fortress was not enough to repel the invasion and in 1580, Spanish troops led by the Duque of Alba took the village during the conflict that led to the union of the Portuguese and Spanish crowns. The fortress was enlarged towards the end of the 16th century by King Philip I (Philip II of Spain), turning it into a typical renaissance citadel with the characteristic flat profile and star-shaped floorplan. Various fortresses were built on the coast around Cascais during the 17th century, and many of them still exist.
In 1755, the great Lisbon earthquake destroyed a large portion of the village. Around 1774, the Marquis of Pombal, prime-minister of King José I, took protective measures for the commercialisation of the wine of Carcavelos and established the Royal Factory of Wool in the village, which existed until the early 19th century. During the invasion of Portugal by Napoleonic troops in 1807, the citadel of Cascais was occupied by the French, with General Junot staying some time in the village.
This situation of decadence started to change when King Luís II decided to turn the citadel of Cascais into his summer residence. From 1870 to 1908, the Royal Family came to Cascais to enjoy the sea, turning the somnolent fishing village into a cosmopolitan address. The citadel gained electric light in 1878, the first in the country, thanks to King Luís. The village gained better roads to Lisbon and Sintra, a casino, a bullfight ring, a sport club, and improvements in the basic infrastructure for the population. The railway arrived in 1889. Many noble families built beautiful mansions in Cascais, as can still be seen in the centre and surroundings of the town.
In 1896, King Carlos I, a lover of all maritime activities, installed in the citadel the first oceanographic laboratory in Portugal. The King himself led a total of 12 scientific expeditions to the coast, only ended in 1908 with his assassination in Lisbon.
Another important step in the touristic development of the area was given in the first half of the 20th century in neighbouring Estoril, in which a casino was built and the infrastructure for luxury vacations was created around Monte Estoril.
Due to Portugal's neutrality in World War II and the town's elegance and royal past, Cascais became home to many of the exiled royal families of Europe, including those of Spain, Italy, and Bulgaria.
Nowadays, Cascais and its surroundings are a famous vacation spot for the Portuguese and foreigners, aiming at both the "jet-set" and normal tourism, who seek to enjoy its beaches.