Rosenstein served in the Royal Navy 1776–78, where he became a midshipman and took an active part in Sir Peter Parker's squadron in the West Indies and participated in the Battle of Ushant against the French. Only the lack of money had refrained Rosenstein from joining the French Navy, which he did in 1779, the year after his return. As a French naval officer, he participated in the American Revolutionary War and was in the Battle of the Saintes on 12 April 1782 captured by his former commander Admiral Parker and was taken to England, where he nonetheless soon was freed against his word of honor that he would not fight against the English. He left the French Navy in 1783 and on his return to Sweden, adorned with the French "*Order of Military Merit", he was immediately appointed "sekundmajor" in the Stockholm Squadron of the Fleet of the Army and was promoted to lieutenant colonel in 1785.