He took an active part in the Azov campaigns (1695–1696) against the Ottoman Empire. During the tsar's first foreign tour in the next year, Menshikov worked by his side in the dockyard of Amsterdam, and acquired a thorough knowledge of shipbuilding and colloquial Dutch and German. He acted as subordinate to Boris Sheremetev, who was commander-in-chief during the retreat before Charles XII in 1708, subsequently participating in the battle of Holowczyn, the reduction of Mazepa, and the crowning victory of Poltava (), where he won his field-marshal's baton.