Having passed the officer's exam at the Nicholas Cavalry College [ru], on September 7, 1896 he was promoted to cornet.
Lieven wrote in his memoirs: "... a day before the start of the German offensive on Pskov and Narva ... the Bolsheviks arrested me with my wife and minor daughter.
In January 1919, he formed and led the Liepāja Volunteer Rifle Detachment (Russian: Либавский добровольческий стрелковый отряд, romanized: Libavskiy dobrovol'cheskiy strelkovyy otryad).
Later, his unit was incorporated into the Baltische Landeswehr and participated in battles around Ventspils, Jelgava and also the liberation of Riga.
Together with parts of Rüdiger von der Goltz's Baltische Landeswehr at the end of May 1919, they forced the Bolsheviks out of Riga, which they had previously occupied.
Although most of the Landeswehr, after the Latvians refused to recognize the pro-German regime of Andrievs Niedra, fought against independent Latvia, in May 1919, parts of the Landeswehr subordinate to Lieven recognized Latvia's independence and went over to the side of the Latvian armed forces.
Lieven considered it fundamental, for the sake of the common anti-Bolshevik struggle, to support the independence of the Baltic states and abandon the idea of "one indivisible Russia".
Lieven forbade his men to fight the Estonian Army and Northern Latvia brigade in Vidzeme, unlike the rest of the Baltische Landeswehr.
Pavel Bermondt Avalov and colonel Virgolitz refused to leave Latvia and stayed in Jelgava.
He returned to Latvia in 1924; but meanwhile, Latvian agrarian reforms were launched and his Mežotne palace was seized by the government and his lands divided.