From August 1937 to January 1938 Levchenko was Chief of Staff of the Baltic Fleet, and from January 1938 to April 1939 commanded the Baltic Fleet. On 3 April 1939 he was promoted to "flagman 1st rank" and became Deputy Commissar of the Navy. On 4 June 1940 he was promoted to vice admiral, and went to the Southern Front during the Second World War, where he participated in the battles of Odessa, Nikolayev and Sevastopol. On 22 October 1941 he took command of the troops in the Crimea, until early November 1941. With the fall of Kerch to Axis forces that month, Levchenko was arrested on a charge of inciting defeatism and panic. Grigory Kulik testified against him, and Levchenko was sentenced to 10 years in prison on 25 January 1942. He was pardoned on 31 January, though he was demoted to captain 1st rank on 19 March 1942.