Born in San Felice sul Panaro, Bergamini became a Guardiamarina (ensign) in 1908. He participated in the Italian-Turkish war as an officer on the armoured cruiser Vettor Pisani. During World War I, he was the chief of artillery on the cruiser Pisa. In 1918 he received a silver medal for his bravery during an operation off the coast of Albania.
His first command was that of the destroyer Giacinto Carini. In the time between World War I and World War II, he rose to the rank of Ammiraglio di Divisione; he notably contributed to the design of the fire-control system adopted on the major Italian warships.
While Italy remained neutral, Bergamini commanded the 4th and then the 9th Naval Division. He then became the Chief of Staff of the 1st Squadra Navale. He participated in the Battle of Cape Spartivento (known in Italy as the Battle of Cape Teulada) on board the battleship Vittorio Veneto. After a brief time at the Italian high command he was again named commander of 9 Naval Division (flagship Vittorio Veneto) and then of 5th Naval Division (flagship Caio Duilio).
On 5 March 1943, he commanded of Squadra Navale (the whole Italian fleet), replacing Admiral Angelo Iachino.
In the early hours of 8 September 1943, the fleet was poised to oppose the Allied landing at Salerno; later that evening, he was told of the Italian Armistice. He was ordered to reach Allied-controlled Tunisia and his fleet left La Spezia, for the Italian controlled naval base at La Maddalena.
On 9 September 1943, Bergamini received news that La Maddalena had fallen to the Germans. The fleet then headed for Tunisia. Later that afternoon, Bergamini's fleet was attacked by a wing of German bombers near Porto Torres. Bergamini's flagship Roma did not open fire immediately, following orders from Pietro Badoglio; when the ships opened fire it was clear that the German planes were staying out of range of the Italian anti-aircraft guns. Subsequently, Roma was hit by a Fritz X guided bomb, a weapon unknown to the Italians at the time. Bergamini, the ship's captain and 1,350 other crew members were killed when the ship exploded and sank.
Bergamini was posthumously promoted to the rank of Ammiraglio d'Armata (full Admiral).
The Italian frigate Carlo Bergamini, launched 1960, was named for him. The first of the Italian Marina Militare FREMM multipurpose frigates, commissioned in 2013, has also been named in his honor.