During the summer of 1789 MacDonnell joined the Swedish Navy to take part in the Russo-Swedish War and was assigned command of the hemmema "Oden" with Måns von Rosenstein. During the 1789 Battle of Svensksund he had a ten-and-a-half-hour cannonade battle with several Russian ships. MacDonnell eventually surrendered after becoming surrounded by seven ships. Having already lost one-third of his crew and with only four cannon still operating, he was badly injured himself. He was taken a prisoner of war in St Petersburg. Upon his release he was awarded military honours by Gustav III of Sweden. He was reportedly offered the supreme command of the entire Swedish Navy with 35 ships and 20,000 sailors. He declined the position as a condition of his early release from Russia was that he would not go to war with Russia again. Correspondence with the King of Spain approved his decision to decline the offer. He did remain as a naval advisor to the king sitting on his war council.