The attacks began around 2am with intense gun battles raging and fires burning in several shops in Ghazni city.
Taliban militants hiding inside homes in the city's residential areas slipped into the streets attacking Afghan security forces, provincial police chief Farid Ahmad Mashal said.
After repulsing the daring nighttime assault, police were conducting house-to-house searches for stragglers and to discover how the Taliban infiltrated so deep into Ghazni city, barely 120 kilometres south of Kabul.
Administrator of the Ghazni city hospital, Baz Mohammad Hemat, said 14 security forces were killed and 20 security personnel were wounded.
So far two civilians were wounded, but Hemat said the city was shut down and ambulances are not being sent out.
Mashal said 12 police had been wounded and there were more than 100 other casualties.
He did not say how many were dead and how many were wounded. Most of the casualties were Taliban, he said.
Several bodies of dead Taliban militants remained on the street after the government pushed back the Taliban from the city, the police chief said.
He said the bodies of 39 Taliban militants were recovered beneath a bridge in the southern edge of the city. Air strikes called in to quash the offensive also killed dozens of Taliban, he said.
Defence Ministry spokesman Mohammad Radmanish said the army helped the police and the city was under control of government forces.
Taliban spokesman Zabihullah Mujahid claimed parts of the city had been seized and scores of people killed.
He said three Taliban had been killed and eight wounded.
Inside Ghazni city, residents were staying indoors making independent verification of the different claims impossible.
All shops in the city were closed due to the fighting. The road from Kabul to Afghanistan's southern provinces was also closed because it runs through Ghazni.