Months before Kveder's return to Slovenia in 1941, the Axis invaded Yugoslavia and an active World War II in Yugoslavia was taking place. Immediately following his escape, he re-established contact with the communist party and joined the Yugoslav Partisans fighting against the Axis occupation. He played an active role on the Slovene Front and in 1943 became Chief of the General Staff of the National Liberation Army of Slovenia. During the war he was described by allied observers as being particularly hostile toward the Americans and British, instead favoring a pro-Soviet stance. Following the war, he continued his career in the Yugoslav People's Army and from 1946 to 1948 attended the K. Е. Voroshilov Higher Military Academy in the Soviet Union. Upon his return, Kveder was appointed deputy commander of the Belgrade Military Academy and also served as editor in chief of the newspaper "Vojno delo".