During the Polish September Campaign, Kozielewski's 5th Regiment was part of the Kraków Cavalry Brigade, under General Zygmunt Piasecki, a unit of the "Armia Kraków" defending the area between Zabkowice and Częstochowa. After the Battle of Tomaszów Lubelski on 10 September 1939, some units, including Kozielewski's 1st Battery, 5th Regiment, tried to reach Hungary, but were captured by the Red Army between 17 and 20 September. Kozielewski was held prisoner in the Kozielszczyna camp (presently in Ukraine). He successfully concealed his true rank of second lieutenant and, after a uniform exchange, was identified by the NKVD commander as a private. He was transferred to the Germans as a person born in Łódź, which was incorporated into the Third Reich, and thus escaped the Katyn massacre of Polish officers by the Soviets.