In Rome during German occupation, he was drafted into the German Army where he worked as the interpreter for the Nazi commanders, General Rainer Stahel and General Kurt Mälzer. After contacting members of the anti-Fascist Resistance in Rome he passed them information gleaned from his work, including information about the deportation of Jews and the Ardeatine massacre. Eventually deserting, Hoffman hid with his family in a convent, and later a safe apartment. In November 1944 he was convicted in absentia and sentenced to death for treason by a German military court in occupied northern Italy.