Although he was not involved in the failed assassination attempt of 20 July 1944, Scharnagl was arrested and detained in the Dachau concentration camp. After the liberation of the camp and the subsequent surrender of the German Wehrmacht, Scharnagl was placed by the US armed forces in May 1945 in the position as mayor of Munich. Together with Karl Meitinger he played an important role in the historicist reconstruction of the city center ("Scharnagl Plan") and was the initiator of the "Kulturbaufonds" Munich. To commemorate his plans for a traffic circle, a section of Altstadtring was named after him.