Circumstances in the 1780s, including the war between Russia and the Ottoman Empire, and the moving of a portion of the Russian Baltic Fleet to the Black Sea, prompted the Swedish King, Gustavus III to attack the Russian Empire in 1788. It was also started to distract domestic attention up for domestic political problems and for the king to be able to fulfil his role as the king and hero. His main aim was to recapture some of the territory in Finland which had been lost to the Russians in the 1740s. In 1788, he began a maritime campaign in the Gulf of Finland, intended to exploit the relative weakness of the Russians. From here, he planned to attack Kronstadt and St Petersburg. However, the Swedish army was crippled by political factions, and, as a result, Gustavus was forced to rely heavily on his navy including his new inshore defence fleet based at the sea fortress of Sveaborg. The war was supposed to be won by a surprise assault on St Petersburg, conducted by the Swedish Royal Navy and the Army's navy; (Skärgårdsflottan). The latter was a superb brown-water force, designed for coastal amphibious warfare in the Baltics and the elite of the Swedish armed force in the late 18th century. However, after the Battle of Hogland (1788) (a tactical tie but a strategic failure for the Swedes) the Russians gained the initiative and the tensions in Sweden rose. The First Battle of Svensksund on August 24, 1789 had ended in a Swedish defeat.
In 1790 an attempt to assault Vyborg failed, and the Swedish navy, caught in a trap on July 3 in the Bay of Vyborg during the Battle of Vyborg Bay, was able to escape, but with heavy losses. After retreating to Svensksund, King Gustav III together with his Flag Captain Lieutenant-Colonel Carl Olof Cronstedt waited and prepared the fleet for the expected Russian attack. On 6 July, the final decisions were made for the defences, and early in the morning on 9 July 1790 the ordre de bataille was given and the battle started. The battle started very well for the Swedes; although Russia had superiority in men and guns, the Swedish forces were anchored in a strong L-shaped formation. On the first day, the Russians attacked to the south, but were scattered by wind and sea. They took a battering from the Swedish coastal forces, including shore batteries, anchored galleys and gunboats. The Swedes then advanced their gunboats down the left flank, forcing the Russian gunboats to flee. This in turn led to the Russian galleys being overcome by waves and sea, and either sunk or run aground. Several sailing ships, anchored in position, were boarded and either captured or burnt. At dawn the next morning, the Swedes consolidated their position with an attack and succeeded in driving the Russian fleet off. The Russians lost 7,500-9,500 of 14,000 men dead, wounded and captured, 64 vessels sunk, burnt or taken and one third of their fleet captured, compared with Swedish losses of 4-6 ships and 300 men. Along with 21 other ships the Swedes captured the flagship of Prince Nassau, the Catarina. The second battle of Svensksund is the biggest naval battle ever fought in the Baltic sea: 500 ships (including supply ships and other ships not involved in combat), close to 30,000 men and several thousand cannons. In Svensksund, the Swedes boasted to have destroyed 40 percent of the Russian coastal fleet. It is even considered one of the largest naval battles in history in terms of the number of vessels involved. Only the Battle of Leyte Gulf has involved a larger number of vessels (if sources from the Classical Era regarding the Battle of Salamis and Battle of Ecnomus are disregarded).
This defeat encouraged Russia to negotiate with Sweden eventually signing the Treaty of Värälä on August 14, 1790. Neither side gained any territory. After the war the Russians started a massive fortification programme on the eastern, Russian, side of the Kymi river, building the sea fortress Fort Slava and the land fortress Kyminlinna. The forts later grew into the port city of Kotka.
The Russian frigate Sankt Nikolai was sunk in the battle. She was found in 1948 almost intact in the sea bottom outside Kotka. Over 2300 objects have been recovered from her hull by divers.
Ruotsinsalmen toinen meritaistelu on suurimpia koskaan käytyjä meritaisteluita. Se käytiin osana Kustaa III:n sotaa Ruotsin ja Venäjän laivastojen välillä Kotkansaaren, Mussalon ja Kuutsalon saarten välisellä alueella nykyisessä Kotkassa heinäkuussa 1790.
Vain vuotta aiemmin käytiin samalla paikalla Ruotsinsalmen I meritaistelu, jonka Ruotsi hävisi.
Toinen taistelu päättyi Carl Olof Cronstedtin johdolla Ruotsin laivaston ylivoimaiseen ja Ruotsin historian suurimpaan merivoittoon. Voiton ansiosta Ruotsi sai paremmat lähtökohdat Värälän rauhanneuvotteluihin.
Taistelun jälkeen venäläiset rakensivat Kymijoen suulle Ruotsinsalmen - Kyminlinnan kaksoislinnoituksen, ja varsinkin Kotkansaarelle kasvoi asutusta. Samalla paikalla on nyt Kotkan kaupungin keskusta.
Taistelun vuosipäivää, 9. heinäkuuta, vietetään merivoimien vuosipäivänä.