The Kajaani castle (Finnish: Kajaanin linna, Swedish: Kajaneborg, Kajaneborgs slott, or with older spelling Cajanaborg) was built on the Ämmäkoski island of the Kajaani river in the centre of Kajaani, Finland, in the 17th century. Today, only roofless ruins remain of the castle.
The castle functioned as an administrative centre, a prison, and a military strongpoint. The most famous prisoner in the castle was the historian Johannes Messenius, who was forced to live in the poor conditions of the castle from 1616 to 1635.
Construction of the Kajaani castle began in 1604 and was completed in 1619. At first the castle only consisted of a stone wall, two round towers, and wooden buildings at the yard inside the castle.
Count Peter Brahe ordered a second construction stage of the castle, which was started in the 1650s and completed in 1666. During this construction stage, many wooden structures of the castle were replaced with stone structures to form a fortress.
During the Great Northern War (also known as the "Greater Wrath"), Russian forces sieged the castle for several months, until it was finally forced to surrender because of lack of food, firewood and ammunition. Shortly after this, the Russians exploded the castle and its inhabitants were transported to Russia to be imprisoned.
In 1917 a hydro-electric plant was built at Ämmäkoski.
The first wooden bridge on top of the ruins was built in 1845. By 1937 the castle-island became a fundament for a new road-bridge made of concrete.
The bridge called Linnansilta ("castle bridge") was originally the only bridge across the Kajaani river. After the construction of later bridges, the traffic on Linnansilta has reduced and the authorities have drafted plans to take down the bridge and give this national monument a due and proper restoration.