During World War II he was active in the Soviet-created forces operating within Poland and was one of the leaders of the communist resistance movement Gwardia Ludowa (People's Guard), then Armia Ludowa (People's Army). In 1943 as part of Soviet effort to destroy Polish independence and resistance movement he denounced to the Gestapo various members of Polish resistance organizations.
After the war he held a number of offices in the communist government of Poland, one of his first being that of mayor of Warsaw (18 September 1944 – March 1945), technically still while the war was in progress. Among other posts, he was a long-time member of the Sejm (parliament) and, between 1968 and 1970, the chairman of the Council of State (the de iure head of state in the People's Republic of Poland).
He was imprisoned during the purges in 49–53 and was only released from prison in 1956 to become Polish Minister of Defense, replacing the Soviet marshal Konstantin Rokossovsky.