The origins of Carloforte date back to the 18th century, although the zone, for its particular shape, was exploited in the ancient world by Romans and Carthaginians as a port. The city was born to the immigration of the inhabitants of Tabarka, in Tunisia, since the site was attacked by pirates. The ancient Sea village was desired by the King of Sardinia, Carlo Emanuele III (1701-1773), with the intent to repopulate the island of Sardinia. He therefore allowed the allocation on the island of “San Pietro” a few hundred refugees of Tabarka.

Initially, in 1541, accompanying the Lomellini, the Lords of Pegli (Genoa), some inhabitants of Genoa landed in Tabarka, an island near the coast of Tunisia, to concentrate on fishing of coral. At the beginning of the 18th century, for the repeated Barbary Pirate attacks and  the impoverishment of the coralliferous benches, the so-called “Tabarkini” (inhabitants of Tabarka) accepted the invitation of Carlo Emanuele III of Savoy, King of the Kingdom of Sardinia, and moved to the uninhabited  island of  “San.Pietro”; they founded then the town of "Carloforte" in honour of the sovereign. The etymology is therefore clear; it is the " ‘Carlo’s Fortified-Town".

The first quarter built was said “the Navy”; then Engineer La Vallée erected the Church, walls and Castle. These military works perfectly preserved, even today, were of course built to protect themselves from frequent incursions of Algerian and Tunisian pirates. The city and its inhabitants had soon to thrive, thanks to numerous economic activities, such as the pinking of coral, tuna fishing, salt production, agriculture, and crafts. In the island of “San Pietro” they continued their activities always devoting himself to tuna fishing and coral. At the end of the 18th century Carloforte underwent two invasions, the first by French and the second, much more dramatic, by Tunisian Pirates that  leaved again for Africa with over 800 people hostage.

In the second half of the 19th century Carloforte knew a great development, favoured by the transfer of minerals extracted in near “Iglesiente-Guspinese” Region and transported to the island with contractors and local man-power towards Europe. The island of “San Pietro” today confirms with tourism its vocation.