The foundations of the town were laid when Erik Axelsson Tott founded the castle of Olavinlinna on the island of Kyrönsalmi in 1475. The castle, named after St Olaf, which was initially also known as the "new castle", Nyslott in Swedish, was built to protect the eastern border between Sweden and Russia.
A community began to grow up on the island of Vääräsaari next to the castle, and in 1639 a town charter was granted by Per Brahe, founding the town of Savonlinna.
Development of the town took off in the early twentieth century with the opening of the Olavin Kylpylaitos spa and the birth of a flourishing sawmill industry. The construction of the Saimaa canal and the railway further boosted the town's development. By the start of the twentieth century, Savonlinna was the hub of water-borne traffic on the Lake Saimaa network. The town also started to industrialise in the same period.
Tourism took off after the First World War when spa enthusiasts found Savonlinna a popular destination. The railway link to St Petersburg was already up and running.
In 1973 much of Sääminki municipality became part of the municipality of Savonlinna.
Savonranta municipality merged with Savonlinna in 2009. Kerimäki and Punkaharju municipalities merged with Savonlinna in 2013.