After serving as an ordinary soldier in the final stages of the Russian Civil War, Kazakov became a political commissar during the 1920s but shifted over to command and staff positions from the mid-1920s. He rose to chief of staff the Central Asian Military District by the time Operation Barbarossa began, and 1942 and 1943 served as chief of staff and deputy commander of fronts, with a stint as commander of the 69th Army during the Third Battle of Kharkov. Kazakov commanded the 10th Guards Army from early 1944 as it advanced into the Baltic states and blockaded the Courland Pocket. Postwar, he rose to command of the Southern Group of Forces and the Leningrad Military District, ending his career as first deputy chief of the General Staff.