On 22 June, the German invasion of the Soviet Union, Operation Barbarossa, began. By 27 June, the Red Army General Staff had almost no reliable information from the Belorussian Special Military District. To clarify the situation, Ivanov flew in an Ilyushin Il-4 escorted by two fighters to meet with front commander Dmitry Pavlov. After flying over two German tank columns, Ivanov's aircraft landed at the headquarters of the 3rd Long-range Bomber Aviation Corps. On 29 July, his aircraft took off in another attempt to find Pavlov's headquarters but was shot down. Ivanov and the crew received shrapnel wounds, and he was evacuated to Moscow for treatment. After leaving the hospital, he taught at the Frunze Military Academy and participated in the defence of Moscow, helping to erect fortifications near Poklonnaya Hill during September. He was evacuated along with the academy to Central Asia. In March 1942, Ivanov became the chief of staff of the 24th Rifle Corps, part of the 60th Army. He fought in the Battle of the Dnieper during September 1943. For his actions during the battle, Ivanov was awarded the Order of the Red Banner on 20 September. He then fought in the Battle of Kiev.