During World War II, he developed contacts with Claus von Stauffenberg and the 20 July plot conspirators, including Carl Goerdeler. In the 20 July plot, once the Nazis had been routed, Koch was slated to become the presiding judge of the "Reichsgericht", the highest court in the German Reich. The plot failed, however, and Koch sheltered one of the conspirators. An informer denounced him and Koch and his family were arrested. He was murdered extrajudicially in Berlin by a Sonderkommando of the SS-Reichssicherheitshauptamt on 24 April 1945.