He was involved in the Oster Conspiracy of September 1938 and was arrested in 1943 on suspicion of helping Abwehr officers caught helping Jews escape Germany. After the failed 1944 July Plot on Hitler's life, the Gestapo seized the diaries of Admiral Wilhelm Canaris, the head of Abwehr, in which Oster's anti-Nazi activities were revealed. In April 1945, he was hanged with Canaris and Dietrich Bonhoeffer at Flossenbürg concentration camp.