From November 1918 on he was a member of Polish Military Organisation in Zhytomyr. During the Polish-Soviet War in 1920 he fought in irregular units. He served in the Polish Army from 1922 in the 10th Sapper Regiment in Przemyśl and in the 3rd Sapper Battalion in Wilno. He took part in the Invasion of Poland against Nazi invaders as commander of the 60th Sapper Battalion in Army Modlin.
After the defeat of Poland he joined the anti-Nazi underground. As early as 27 September 1939 he joined Service for Poland's Victory, later transformed into Union of Armed Struggle (ZWZ). In 1940 he was made a leader of a special "Reprisal" unit of ZWZ charged with sabotage and armed struggle. He was a co-organizer of the Directorate of Sabotage and Diversion, Kedyw, of the Home Army, and in 1943 he was made the second in command of the unit, after Gen. Emil Fieldorf ("Nil"). He fought in the Warsaw Uprising as chief of the Sapper's Section of the 3rd Regiment of AK's Headquarters, with the rank of colonel. After the surrender of the uprising he was imprisoned and in January 1945 sent to The Woldenberg II C Oflag.
After returning to Poland from his imprisonment he became once again involved in the resistance, this time directed against the new communist authorities. Initially he was the second in command of Col. Antoni Sanojcy of Region "South" of the Armed Forces Delegation for Poland, and later the president of the southern region for the organization Freedom and Independence (WiN). As president of WiN he took the step of recognizing the Polish Government in Exile (which by this time was no longer recognized as the official government of Poland by the Allies) as the legitimate governing body and took the decision of expanding the activities of WiN. He made the organization grow and hoped to lead it to a point where eventually it could be made legal.
On 22 October 1946 Niepokólczycki was arrested by the Polish secret police (UB) in Kraków. A year later, in a show trial of WiN leaders he was sentenced to death. This sentence was later changed to life imprisonment.