The city, which had a pre-war population of roughly 60,000, sits roughly 12 miles from Kyiv and is close to the key battleground site at Hostomel airfield.
“We have good news today, Irpin has been liberated,” the mayor, Oleksandr Markushyn, said in a video posted on Twitter.
He said: “We understand that there will be more attacks on our city and we will defend it courageously.”
There has been weeks of heavy fighting around the area, but with Russia now refocusing its campaign on the east of the country, Ukrainian forces have been scoring victories on several other fronts.
A US defence official stated on Monday that Ukrainian forces had also retaken the town of Trostyanets, in the north east of the country, from Russian control.
Irpin has seen some of the most sustained shelling of the entire war, with many of its buildings reduced to rubble.
The retaking of Irpin will take some of the pressure off Kyiv, which has also been heavily shelled nearly constantly since the start of the war.
Irpin has been contested for weeks, with Russian troops able to freely move through the parts of the city in the first half of March, but Ukrainian counterattacks stalling their progress to Kyiv.
On March 6 a mother and her child were gunned down by Russian forces as they tried to flee the city through a supposedly safe evacuation corridor.
For expert analysis of this topic, listen to the Ukraine episodes of the What You Need To Know podcast
Last week Moscow claimed it completed the first part of the military operation in Ukraine and would now be focusing on the eastern Donbas region, which has been partially controlled by Russia-backed separatists since 2014.Russia has supported the separatist rebels in Luhansk and neighbouring Donetsk since the insurgency erupted there shortly after Moscow annexed the Crimean Peninsula from Ukraine.
In talks with Ukraine, Moscow has demanded Kyiv acknowledge the independence of Donetsk and Luhansk.In response to Russia's announcement, Kyrylo Budanov, the head of Ukrainian military intelligence said the change of focus could reflect Putin’s hope to break Ukraine in two, like North and South Korea, and enforce “a line of separation between the occupied and unoccupied regions.”