Russia has been trying to capture Avdiivka for months. It is the most significant territorial gain for Russian forces since they seized the eastern city of Bakhmut last May and comes ahead of the second anniversary of the start of the invasion,
France 24 reports.
"I decided to withdraw our units from the city and switch to defence on more favourable lines," Syrsky said on Facebook.
"Our soldiers performed their military duty with dignity, did everything possible to destroy the best Russian military units and inflicted significant losses on the enemy."
It is Syrsky's first major decision since his appointment on February 8 and he said it was taken to preserve the lives of soldiers and prevent their encirclement.
Ukraine faces mounting pressure on the eastern front because of ammunition shortages, with a $60 billion US military aid package held up in Washington since last year by congressional wrangling.
General Oleksandr Tarnavsky, who commands the Avdiivka area, said of the withdrawal: "In a situation where the enemy is advancing over the corpses of their own soldiers with a ten-to-one shelling advantage, under constant bombardment, this is the only right decision."
"Encirclement was prevented, personnel were withdrawn, and our soldiers took up defence at the designated lines," he posted on Telegram.
Before issuing orders to pull out of Avdiivka, Tarnavsky on Friday said several Ukrainian soldiers had been captured by Russian forces.
The battle for the industrial hub, less than 10 kilometres (six miles) north of the Russian-controlled city of Donetsk, has been one of the bloodiest of the two-year war.
Many compare it to the battle for Bakhmut, in which tens of thousands of soldiers were killed.