Yermolov was born on 4 June 1777 in Moscow to a Russian noble family from the Oryol gubernia. He graduated from the boarding school of the Moscow University and enlisted in the Guards Preobrazhensky Regiment on 16 January 1787. Four years later, he was promoted to lieutenant and transferred to the Nizhegorod Dragoon Regiment with the rank of captain. He briefly taught at the Artillery and Engineer Cadet Corps in 1793 before being sent to fight the Polish insurgents in the Polish campaign of 1794. He participated in the assault on Praga and received the Order of St. George (4th class) on 12 January 1795. The next year, Yermolov took part in the Persian Campaign along the Caspian Sea. However, he was arrested on 7 January 1799 for alleged participation in conspiracy against Tsar Paul I and spent two years in exile to Kostroma, where he taught himself Latin.