Earlier, clashes were reported in a small part of Old City where a few dozen IS militants were holding out.
The battle for Mosul has taken almost nine months, left large areas in ruins, killed thousands of civilians and displaced more than 920,000 others.
Commanders from the US-led coalition that has provided air and ground support to Iraqi forces said the urban combat had been most intense since World War Two.
Mr Abadi made the declaration of victory at the operations room of the Counter-Terrorism Service, whose elite forces were the first to enter Mosul in November.
Using a pejorative term for IS based on an Arabic acronym of its former name, he said: "I announce from here the end and the failure and the collapse of the terrorist state of falsehood and terrorism, which the terrorist Daesh announced from Mosul."
More about: #Mosul