As Charles X Gustav prepared for Second Northern War, Wittenberg was promoted to field marshal in 1655 and was assigned command of an army of 17,000 men to attack Poland with. He surrounded the Polish army of nobles and forced it to capitulate at Ujście on 25 July 1655, and conquered the voivodships of Poznań and Kalisz. He besieged Kraków, which capitulated 7 October 1655, and forced the Polish commander Koniecpolski and his army to submission. He was given the command of Warsaw which he defended against the Polish army under John II Casimir of Poland until the city was given up 21 June 1656. Contrary to what had been stated in the terms of capitulation, he was placed in prison in Zamość where he later died.