After the Nazis took over Hungary in March 1944, Sławik went underground and ordered as many of the refugees as were under his command to leave Hungary. Because he had appointed a new commanding officer of the camp for Polish Jews, all of them were able to escape and leave Hungary. The Jewish children of the orphanage in Vác were also evacuated. Sławik was arrested by the Germans on March 19, 1944. Although brutally tortured, he did not inform on his Hungarian colleagues. He was sent to the concentration camp Gusen where he was hanged with some of his fellows on August 23, 1944. His wife survived the Ravensbrück concentration camp and after the war found their daughter hidden in Hungary by the Antall family. Sławik's place of burial remains unknown.