In January 1944, Ivanov became the chief of staff of the 27th Rifle Corps, part of the 13th Army. On 10 January, he was awarded the Order of Suvorov 2nd class. On 2 September, he was awarded the Order of the Red Banner. Ivanov was promoted to command of the 6th Guards Rifle Division on 3 September. Ivanov led the division during the Vistula–Oder Offensive. On 26 January 1945, the division crossed the Oder near Steinau an der Oder and seized a bridgehead on its left bank. Within three days, the division reportedly repulsed all German counterattacks and expanded the bridgehead, reportedly inflicting heavy losses on German troops. Ivanov was awarded the title Hero of the Soviet Union and the Order of Lenin on 6 April for his leadership in the Vistula-Oder Offensive. The division then fought in the Berlin Offensive, capturing Zahna on 22 April. The division was then transferred to fight in the Prague Offensive. Ivanov ended the war in Prague. He was awarded the Order of Kutuzov 2nd class on 25 May. On 27 June, he was promoted to major general. In the Moscow Victory Parade of 1945, Ivanov commanded a battalion.