He immediately had to go to war because of the Russian/Danish/Polish alliance attack on Sweden in 1700. After that, he was involved in almost constant war until his death. Because of this, he is also called "The Warrior King". After initial successes, for instance victory in the battle at Narva, the extended war became more and more expensive and difficult for Sweden.
In 1709 Karl XII was beaten by the Russians at Poltava and the Swedish army surrendered. The king ,however, escaped to the town of Bender, near Denser in the Ottoman Empire, were he stayed for five years, trying to convince the Turks to attack Russia. This did not succeed and he returned to Sweden. In 1718 Sweden attacked Norway and in the Battle of the Fortress of Fredriksten, the King was shot in the head and killed.
it isn't known whether the bullet came from the Norwegian or Swedish side. Whether he was assassinated or not, his death put a welcome end to the Swedish campaigns and the exhausted nation could eventually achieve peace.
This bullet he was shot with is the bullet on the picture...

