At the beginning of the Great Patriotic War, he commanded the 7th Mechanized Corps' artillery formations. Kazakov took part in the battles for Smolensk and Moscow, and developed new methods for the use of anti-tank artillery, which were adopted by the entire army. In July 1942 he was made Rokossovsky's artillery commander at the Bryansk Front. In that capacity, he continued to work with the General at the Stalingrad, Don, Central and 1st Belorussian Fronts. On 17 November 1942, he became an Lieutenant General, and was made a Colonel-General on 18 September 1943. Kazakov was among the planners of the Kursk deep defense lines. He participated in the Lower Dnieper Offensive, in Operation Bagration and in the battles inside Germany. For his contribution to the Vistula-Oder Offensive, Kazakov was awarded the title Hero of the Soviet Union (Medal no. 5871) on 6 April 1945.