Beginning in January 1940 Hahn took over as chief of the "Sicherheitsdienst" (SD) and "Sicherheitspolizei" (SiPo) for the occupied city of Kraków. He would oversee "Sonderaktion Krakau", an SS operation which involved the deportation of hundreds of professors and other academics from Jagiellonian University to various concentration camps in Germany. He also served as chief of the "Police Emergency Court" ("Standgericht") at Montelupich Prison. In this capacity Hahn was instrumental in the implementation of the German AB-Aktion in Poland.