Rabbi Shapira's only son, his daughter-in-law, and his sister-in-law were killed during the Nazi aerial bombing of Warsaw in September, 1939. After the invasion of Poland, Rabbi Shapira was interned with a few of his hasidim in the Warsaw Ghetto, where he ran a secret synagogue. He invested enormous efforts in maintaining Jewish life in the ghetto, including arranging for mikveh immersions and kosher marriages. Rabbi Shapira was able to survive in the ghetto until its liquidation, avoiding the tragic deportations to Treblinka in the summer of 1942, because of the support of the Judenrat. Like other notables, he was given work at Schultz's shoe factory—a path to ongoing survival.