At least three rockets hit near the presidential palace shortly before Afghan President Ashraf Ghani was to give an address to mark the Muslim holiday of Eid-al-Adha.
There were no injuries and the rockets landed outside the heavily fortified palace grounds, said Mirwais Stanikzai, spokesman for the interior minister.
No one immediately took responsibility for the rocket attack which seemed more intended to unnerve than do damage.
The palace is in the middle of a so-called Green Zone that is fortified with giant cement blast walls and barbed wire, and streets near the palace have long been closed off.
The barrage comes as the US and Nato complete their final withdrawal from Afghanistan which has unnerved Afghans uncertain whether their war-ravaged country will fall deeper into chaos and violence.
The withdrawal is more than 95% complete and the final US soldier will be gone by August 31, President Joe Biden said in an address earlier this month.
Abdullah Abdullah, the number two official in the government, returned on Monday from the first high-level round of peace talks with the Taliban in the Middle Eastern state of Qatar.
The two days of meetings aimed at jumpstarting stalled talks ended with a promise for more high-level talks.
Mr Abdullah was at the palace at the time of the rocket attack.
Those inside the palace, however, were far removed from where the rockets landed.