By the beginning of the German invasion of the USSR, he served in the 140th separate machine-gun battalion, where he was a commander of a machine-gun platoon. The battalion was based at the Strumyliv Fortified District on the so-called Molotov Line. On the very first day of the war Meleshko was taken prisoner near the village of Parkhach, when his battalion was surrounded after the enemy's massive attacks on the Red Army positions. He was excluded from army lists as a missing person in September 1941.