The presence of a Roman settlement has been not definitely proven. The burgh, known as Pescino, was devastated by Rothari in 641 and by the Saracens in the 10th century. Later it was a fief of the Fieschi family until 1229, when it was acquired by the Republic of Genoa.
In 1432 it was attacked by the fleet of Venice and in 1549, together by Rapallo, by that of Turgut.
In 1813, under the Napoleonic domination, the two burghs of Pescino and Corte were unified as Porto Napoleone. Two years later it was annexed to the Kingdom of Sardinia as the commune of Santa Margherita Ligure. In 1861 it became part of the newly unified Kingdom of Italy.
Connected by rail in the 20th century, Santa Margherita had become a renowned tourist resort after World War II