The first settlement dates probably from the 8th century BC, although the findings have not clarified if it was Etruscan or Greek.
Conquered by the Lombards in 643, the village of Rapallo was included in the county of Genoa under Charlemagne. The name of the city appears for the first time in a document from 964. In 1203 the Podestà of Rapallo was created, which in 1229 it became a Genoese dominion, remaining under that aegis until the Napoleonic Wars. Galleys from Rapallo took part to the famous Battle of Meloria of 1284. On September 5, 1494, it was captured by the Aragonese, but three days later 2,500 Swiss troops ousted them.
During the 16th century it was attacked and sacked by the Ottomans and Barbary pirates; to help defending the village against such attacks a castle was built on the seafront. In 1608 Rapallo was made into a Capitaneato (captainship) of its own, as part of the Republic of Genoa.
In the late 18th century it was captured by the French who, after several clashes against Austro-Russian troops, in 1805 annexed it to the Apennins département. In 1814 the English freed it, and the following year the city was given to the Kingdom of Sardinia-Piedmont as part of the Duchy of Genoa.
In late 1917, an Anglo-Franco-Italian conference met at Rapallo following the disastrous Italian defeat at Caporetto. It was decided to create a supreme war council at Versailles and to shift some French and British troops to the Italian front. On November 12, 1920, Italy and the Kingdom of the Serbs, Croats, and Slovenes (later renamed Yugoslavia) signed the Treaty of Rapallo, 1920, which resolved the frontier issues between them without reference to the other Allies. Italy acquired the strategically important crest of the Julian Alps as her boundary in the northeast. Also concluded at Rapallo was the Russian-German Treaty of Rapallo of April 1922, in which both countries renounced claims to war reparations and renewed diplomatic relations