In his youth, Sheremetyev was a page to Tsar Alexis I before starting his military career. From 1671 he served at the imperial court. In 1681 he was a leader at Tambov, commanding the armies fighting the Crimean Khanate, and from 1682 he was a boyar. From 1685 to 1687 he participated in negotiations and the conclusion of the "Eternal Peace of 1686" with Poland and the allied treaty with Austria. From the end of 1687 he commanded the armies in Belgorod defending Russia's southern border, and participated in the Crimean campaigns.