Within hours, the Taliban claimed to have much of the capital under their control.
At least eight civilians and seven government security personnel were injured, provincial government spokesman Mohammad Arif Noori Ghazni told the BBC.
Taliban militants have launched an attack on an Afghan provincial capital and heavy fighting is under way as security forces try to beat them back, with terrified residents cowering in their homes amid explosions and gunfire.
Taliban spokesman Zabihullah Mujahid issued a statement saying multiple attacks were launched overnight in Ghazni.
The attack underlines the heavy losses still being suffered by security forces as they fight the Taliban insurgents.
Provincial security Chief Farid Ahmad Mashal says the dead bodies of at least 39 militants are left in the eastern parts of the city.
"We are scared for our life".
Radmanish told The Associated Press the Taliban were driven to an area known as Hasanabad about 500 meters (yards) outside the city.
There were also conflicting reports of casualties from government and Taliban officials. Sporadic gunfire could still be heard in the city, where Afghan special forces have been deployed. "We are terrified", Yasan wrote in a Facebook post.
On August 9, Defense Ministry spokesman Mohammad Radmanish said 27 Afghan soldiers were killed and five wounded in the assault. He feared that there were more wounded who could not make it to the hospital because the city was shut down and ambulances were being sent out.More news: Argentina's Senate rejects bill to legalise abortion
More news: 30 killed, over 50,000 homeless as heavy rains continue across Kerala
More news: Transfer: Manchester United in talks to sign Chelsea defender
The Taliban fighters set fire to the local TV building and also destroyed the telecommunications tower, located just outside the city, cutting all cellphone and land line access to Ghazni, said Ali Akbar Kasemi, a lawmaker from the city. "The whole city is under the control of Afghan forces", Brig.
The attack followed a similar assault on Farah in May, when fighters came close to overrunning the city in western Afghanistan.
The residents said airstrikes also targeted Taliban's positions.
The insurgents have also so far ignored an offer by Ghani in February of unconditional peace negotiations.
The Taliban has long insisted on direct talks with the United States.
But there are tentative signs that diplomatic efforts to kick-start talks are starting to bear fruit. USA and North Atlantic Treaty Organisation forces remain in Afghanistan mainly in a supporting and training role in the 17-year-old war.
However, even while conducting preliminary discussions with USA officials, the Taliban have launched a series of operations that underscored their ability to inflict severe damage on Afghan forces.
Anticipation has also been mounting about the possibility of a government ceasefire announcement for the Islamic holiday of Eid-al Adha later this month.
As fighting continued throughout the day, he said US forces returned, sending attack helicopters and fighter jets back to the area.
Don't miss out on the latest news and information.