Wilhelm Canaris joined the imperial royal navy in 1905. In 1919 he was a member of the court martial that acquitted most of those who murdered Karl Liebknecht and Rosa Luxemburg, and in March 1920 he supported the attempted Kapp-Lüttwitz Putsch. He then returned to the navy as an officer in the admiralty staff and in the naval command.
He welcomed the National Socialists taking power in 1933, hoping for a revision of the Treaty of Versailles. In 1935 Rear Admiral Canaris was unexpectedly appointed head of the Reich War Ministry's counterintelligence department (which later became the Office for Foreign Affairs/Counterintelligence in the Armed Forces High Command).
From 1938 on, he took a distanced stance toward the preparations for war, subsequently allowing opposition members of the counterintelligence service free hand but not taking an active part in their plans. In the summer of 1942, Canaris covered up the efforts of Hans Oster and Hans von Dohnanyi to enable a group of Berlin Jews threatened with deportation to escape to Switzerland. The Gestapo was told the Jews were secret agents to be deployed in South America. The plan was known as "Operation Seven" within the counterintelligence service.
When Dohnanyi and Oster were arrested in 1943, Canaris came under increasing Gestapo observation and was removed from office in February 1944. He was arrested three days after July 20, 1944. Incriminating documents were then found in Zossen near Berlin, revealing Canaris's support for several of those involved in the attempted coup. Only weeks before the war ended, Canaris was murdered in Flossenbürg concentration camp along with Dietrich Bonhoeffer, Hans Oster, and others on April 9, 1945.