Joining the Zhlobin Revolutionary Regiment of the Red Army in March 1918, Baranov fought in battles against the White Orenburg Cossacks of Alexander Dutov. As a platoon commander of the regiment, he fought on the Trans-Caspian Front against British troops and White forces from July. After the regiment was shifted to the Turkestan Front in October, Baranov transferred to the 1st Orenburg Consolidated Cavalry Regiment in April 1919, serving as a platoon commander in fighting against the Basmachi movement in Fergana Oblast. He was contused in battle in 1918.