After the Polish Defensive War of 1939 and the outbreak of the World War II, Leon Kozłowski remained in Lwów, where he was arrested by the NKVD. He spent almost two years in various Soviet prisons, and finally was sentenced to death for "anti-Soviet behaviour". However, after the Sikorski–Mayski agreement of 1941 he was released and travelled to Buzuluk, where he tried joined up with the Polish Army formed there by general Władysław Anders.