From November 1918 he was a soldier of the Polish Army. Later, he was assigned to the Second Department of Polish General Staff. During the Polish–Soviet War, he served as a military courier (he imported, among others, Józef Piłsudski's letters to Symon Petliura) and a counterintelligence officer. In 1922, he was transferred to the military reserve for a short period and assigned to the 8th Legions' Infantry Regiment. From 1924 he served in the 13th Infantry Division. He took part in preparations for the May Coup. From 1930 to 1934, under the cover of an inspector of the Riflemen's Association, he conducted counterintelligence activities against the Soviet Union in Vilnius and Brest.