Andrey Glebov was born into a Russian noble family hailing from the Chernigov Governorate. He started serving in the army when he was 20 years old, in Livonia. After having taken service in the 3rd battalion of the Lifland Jager Corps in January 1791, he served in Poland between 1792-1794. On 30 July 1797, he was transferred to the 7th (later 6th) Jager Regiment. In the Italian and Swiss campaigns of 1799 which were led by "Generalissimo" Alexander Suvorov, Glebov distinguished himself in the battles at Brescia (10 April 1799), and at Lecco, which took place on 26–28 April 1799 and during which he became wounded in the left leg. For his deeds in the battle of Lecco, he was awarded the Order of St. Anna, 4th Class. He subsequently continued at Marengo, and on the Tidone and the Trebbia. During the battle of Trebbia, he became wounded in the right leg, and was later promoted to "portupei-junker", which is something like an "elite cadet rank" reserved only for military men from the nobility. He continued military action at Novi, where he became wounded in the head. He was promoted to sub-lieutenant on 25 August 1799, and continued fighting at St.Gothard (wounded in the left hand) and Schwanden; in the latter he became wounded in the head and was captured by the French army. He remained in French captivity for two years.