Pro-government forces had pushed into the town, located 90 kilometres (55 miles) outside Baghdad, from the north two days earlier, fighting their way south.
"Forces from the army and the police and (militiamen) and tribal fighters succeeded today in regaining control of Dhuluiyah," an army major general told AFP.
The officer said that 50 military vehicles advanced from the north and linked up with allied forces in the town's southern Jubur area, which had resisted repeated assault by IS.
This "means the complete liberation of Dhuluiyah and the end of the (IS) presence," he added.
A leader in the Shiite Badr militia, which took part in the operation, confirmed the "complete liberation of Dhuluiyah".
"We succeeded in breaking the blockade which was imposed by (IS) on the Jubur tribe," the commander said.
People fired in the air and honked car horns in celebration, according to a policeman in the town, which is strategically located on roads linking the eastern province of Diyala to Salaheddin province in the north.
Omar al-Juburi, a leader of the tribal forces battling IS, said earlier that military reinforcements had arrived to carry out a renewed push to retake the town.
Clashes took place in some areas on Tuesday where IS forces were holed up in houses, Juburi said.
Signup to our newsletter and follow us on Facebook and Twitter!
IS fighters have been carrying out "suicide attacks" on pro-government forces, he added.
On Monday IS published pictures online showing what it described as battles in Dhuluiyah.
In one of the pictures, fighters are seen rigging a car with explosives. Another shows a man carrying out a suicide attack on government forces.
The Iraqi defence ministry said Monday that government warplanes had carried out raids against jihadists positions in the town.
In October, Iraqi forces retook most of Dhuluiyah from IS, but the jihadists later launched a counter-offensive and were able to recapture ground.
Since Sunday government forces backed by Sunni tribesmen and Shiite militiamen have been clearing bombs and other explosives placed by the jihadists in various parts of the town.
IS spearheaded a militant offensive in June that overran Iraq's second city Mosul and then swept through much of the country's Sunni Arab heartland.
Backed by US-led air strikes, Kurdish forces, Shiite militias and Sunni tribesmen, Iraqi troops have since managed to wrest back some territory from the jihadists, but three major cities and swathes of other territory are still outside government control.
The US-led coalition announced that it had carried out eight air strikes against IS in Iraq on Tuesday, targeting fighters as well as vehicles and buildings used by the jihadists.
It also launched seven raids in Syria, where IS has also seized large areas for its self-proclaimed cross-border Islamic "caliphate".