After Operation Barbarossa began, Sokolov's unit was relocated to the vicinity of Kiev and fought in the battle for the city. Appointed corps chief of staff in August, Sokolov served with the corps in defensive actions in the area of Oster, Konotop, and Belopolets in September before it retreated towards Kursk. In the fighting, the corps was surrounded for five days before it broke out to reach Soviet lines. The corps subsequently fought in the area of Tim, where it was reorganized into the 87th Rifle Division of the 40th Army. In the latter, Sokolov, now a major, was appointed commander of the 283rd Rifle Regiment. When the 87th was converted into the 13th Guards Rifle Division in March 1942, his regiment became the 42nd Guards.