From July 1917 to February 1918, Zagórski served as the commander of the 1st Light Artillery Regiment of the Polish Auxiliary Corps. After the successful break-through of the II Brigade at the Battle of Rarańcza, Zagórski was removed from the Polish Legions for plotting against the Austrian Army. He was interned at Khust, and later court-martialed. His sentence was quickly nullified due to the dissolution of the Austro-Hungarian Empire. Despite having served in the Polish Legions, many within the Legions denounced Zagórski for his loyalty towards the Habsburg Emperors instead of his fellow Polish countrymen.