The attack happened as Karzai was delivering a speech in the Andar district of central Ghazni Province.
The rockets missed their target, and Karzai continued his speech.
The Afghan Defense Ministry said clashes and air strikes over the last 24 hours had killed 27 suspected Taliban militants in southern Zabul Province.
Also in the south, a British soldier from the NATO-led International Security Assistance Force (ISAF) was killed in a fight with suspected insurgents on June 9.
And in the country's northwestern Badghis Province, police said 30 Taliban insurgents and two officers had been killed in an overnight battle.
In Kandahar city, a former Taliban stronghold, more than 100 relatives and tribal elders attended the burial of former top Taliban commander Mullah Dadullah, who was killed in a U.S.-led operation in May.
Dadullah's body was handed over to relatives this week by the Afghan government in exchange for the Taliban releasing four hostages. Those same captors claimed to have killed another hostage, saying authorities had missed a deadline for the handover of Dadullah's body.
(AP, AFP, dpa)