After the outbreak of the war in September, 1939, he became leader of an Einsatzkommando in Poznań. Between 20 and 23 October 1939 the 14 Einsatzkommando that he commanded executed 275 Poles in the Greater Poland region near Poznan who were named as Polish patriots by Wolfgang Bickerich, the Lutheran pastor in Leszno, who had kept a list before the German invasion of Poland in 1939. They included political leaders, teachers, police officers, Catholic priests, workers, and farmers, and included scouts as young as 18. This was the start of Operation Tannenberg organized by Reinhard Heydrich which was meant to eliminate Polish leaders in the parts of Poland annexed to Germany In 1940, he joined the 3rd SS Division Totenkopf in their march into France. He had a position as Regierungsrat, and was an SS-Sturmbannführer in April 1940, when he was assigned to Norway. His first job in Norway was Kommandeur der Sipo und des SD in Bergen was primarily the intelligence service of the SS and the Nazi Party, where the Sicherheitspolizei was a term used in Nazi Germany to describe the state political and criminal investigation security agencies. It was made up by the combined forces of the Gestapo and the Kripo. On 11 October 1941, he was appointed Kommandeur der Sicherheitspolizei und des Sicherheitsdienst in Trondheim. As Kommandeur of the district, he was also chief of Falstad concentration camp outside Trondheim and the prisons in Trondheim. He was promoted to the rank of Obersturmbannführer and received the title of Oberregierungsrat. His immediate superior was Heinrich Fehlis. On 8 May 1945, he fled from Trondheim with a gold bar in his luggage. He was caught and sent back with a police escort on the train and during which he made an unsuccessful attempt to escape.
Trial and execution
Flesch was known for being a notorious torturer, and ordered the execution of many members of the Norwegian resistance movement without any trial. After World War II, in 1946, he was tried for the many cases of torture and murder. He was charged with a series of war crimes committed in Norway; seven instances of killing prisoners five instances of torture and one instance of causing death by withholding medical treatment. The court found that in all but two instances these charges to be proven, and he was found guilty and sentenced to death by execution by firing squad. Flesch appealed to the Supreme Court of Norway on procedural grounds and that the sentence was too harsh; however on 12 February 1948 his appeal was rejected. The sentence was carried out at midnight at Kristiansten festning on 28 February 1948. Right before the order was given to fire, Flesch shouted loudly "Heil Hitler".