The blast could be heard in a live broadcast of the speech.
Police said the Taliban fired two rockets toward the presidential palace during the speech, according to The Associated Press. One rocket landed near the presidential building while a second landed near a NATO compound and the U.S. Embassy but no one was injured, police official Jan Agha said, according to the AP.
"If they are thinking the rocket attack will keep Afghans down, they are wrong," Ghani said in his speech of the attack.
No one has claimed responsibility for the attack, which happened two days after Ghani announced a conditional ceasefire with the Taliban.
Eid al-Adha is considered the most important of two Islamic holidays. It is celebrated for three days by Muslims worldwide.