In May 1943, Oleshev was appointed commander of 31st Army's 36th Rifle Corps. The corps captured Smolensk and Yartsevo during the Battle of Smolensk in summer 1943. In June 1944, the corps fought in Operation Bagration, capturing Orsha and Dubroŭna. On 3 July, he was appointed military commandant of Minsk and oversaw the clearing of rubble from streets, the removal of unexploded ordnance and restoring of power and water supplies during the next ten days. On 14 July, Oleshev was appointed commander of 39th Army's 113th Rifle Corps. He led the corps during the Kaunas Offensive in late July and August. On 28 September, he was awarded the Order of Suvorov 2nd class. In October, the corps fought in the Battle of Memel. During the Battle of Memel, the corps, advancing in the vanguard of the 39th Army, captured Smalininkai on 9 October. The corps then fought in the Gumbinnen Operation. From January 1945, the corps fought in the East Prussian Offensive. The corps helped capture Tilsit and for its actions was awarded the honorific "Tilsit". On 21 February 1945, Oleshev was awarded the Order of Lenin. For its actions in the subsequent Battle of Königsberg, the corps was awarded the Order of the Red Banner. On 5 May, Oleshev was promoted to lieutenant general.