As a secondary school student Stanisław Witkowski was a member of "Association of the Polish Youth "Zet"/"Zarzewie", clandestine organisations fighting for the independence of Poland. In 1912 he studied at the Faculty of Mechanical Engineering, Lwów (Lviv) Polytechnic. There he joined the ranks of the Polish Rifle Squads (organised by Zarzewie), serving in the 1st Academic Company. Following the outbreak of the First World War he volunteered for the Polish Legions, fighting with distinction in the 1st Artillery Regiment. After the so-called "oath crisis" the Polish Legions were disbanded and the legionnaires, including Stanisław Witkowski, were interned by the Germans in the camps of Szczypiorno and Łomża. At Armistice, (which is also Poland's Independence Day) in November 1918, he took an active part in disarming the Germans in Skierniewice, then he enlisted in the Polish Army and went to the eastern front, taking service in the ammunition workshop during the ensuing Polish-Soviet War.