The Taliban claimed responsibility for the attack on an Afghan intelligence post and called on the new government to expedite the exchange of prisoners to facilitate talks.
A car bomb blast in the province killed at least seven intelligence operatives and wounded about 40, said Waheedullah Jumazada, spokesman for the governor of the eastern province of Ghazni, AFP reported.
The Taliban used a military vehicle in their attack and targeted the National Directorate of Security Unit, he said.
The Interior Ministry in Kabul and health officials in Ghazni also confirmed the car bombing.
Taliban spokesman Zabihullah Mujahid said on Twitter that their mujahideen had carried out the attack.
The attack came a day after President Ashraf Ghani and his rival, Abdullah Abdullah, signed a new power-sharing agreement in Kabul, after which they ended a months-long dispute.
The agreement overcomes one of the obstacles to negotiations with the Taliban, which warned on Monday that talks could not take place until the prisoner exchange is completed.
Reacting to the agreement between Ashraf Ghani and Abdullah Abdullah, Taliban spokesman Sohail Shaheen said on Twitter that "what is happening in Kabul is just a series of failed experiments in the past."
"Afghan factions must focus on a real and serious solution to the problem and dialogue must begin," he said.
Last week, President Ashraf Ghani ordered security forces to adopt an offensive strategy after two attacks.
A daytime attack on a Kabul hospital has killed at least 24 people, including mothers and newborns.
The attack, which drew international outrage, was followed by a suicide bombing at a funeral that killed at least 32 mourners.
The Taliban denied responsibility for both attacks, and Ashraf Ghani blamed ISIS.
Following Ashraf Ghani's orders, the Taliban warned that they would step up attacks against Afghan security forces.
Attacks in Afghanistan have increased since the Taliban signed a peace deal with the United States.
The agreement was aimed at paving the way for talks between the government and the militants.
The United States, which wants to pull itself out of its longest-running war, has expressed hope that the talks can now move forward with the government's political progress.
The new power-sharing agreement pledges that Abdullah will lead the peace process and fill 50 percent of cabinet posts.
His spokesman said in a statement that Secretary of State Mike Pompeo had told Ashraf Ghani and Abdullah Abdullah that "the US priority in resolving the conflict is a political settlement."