This is Ukraine's most significant battlefield gain in weeks.
It provides a potential staging post for attacks to the east, while heaping further pressure on the Kremlin.
In a short video released on Sunday, Ukrainian president Volodymyr Zelenskiy thanked soldiers as he said Lyman was "fully cleared".
Russia's defense ministry said on Saturday (October 1) that it was pulling troops out of the area, quote, "in connection with the creation of a threat of encirclement."
Moscow's forces had captured Lyman in May and used it as a logistics and transport hub for its operations in the north of the Donetsk region.
The stinging setback for Russian President Vladimir Putin comes after he proclaimed the annexation of four regions on Friday (September 30) - an area that includes Lyman.
Russia moved to annex these regions after holding what it called referendums - votes that were denounced by Kyiv and Western governments as illegal and coercive.