The volley of missiles struck near the military section of the airport but there were no casualties or immediate claim of responsibility, interior ministry spokesman Najib Danish told AFP.
Police have cordoned off the area to find the exact location from which the rockets were fired, he said, adding that no flights were cancelled.
The attack came hours after Mattis arrived in the Afghan capital, the first member of Donald Trump’s cabinet to visit the war-torn country since his pledge to stay the course in America’s longest war.
The unannounced high-level visit comes as Afghanistan’s beleaguered security forces struggle to beat back the Taliban, which has been on the offensive since the withdrawal of US-led NATO combat troops at the end of 2014.
Mattis, along with NATO chief Jens Stoltenberg, will meet President Ashraf Ghani and other top officials to discuss the US-led NATO “train and assist” mission designed to strengthen Afghanistan’s military so it can defend the country on its own.
“Discussions will focus on the NATO-Afghanistan partnership, including the ongoing NATO-led Resolute Support Mission in support of the Afghan National Defence and Security Forces,” a statement on Resolute Support’s Facebook page said.
US generals have for months been calling the situation in Afghanistan a stalemate, despite years of support for Afghan partners, continued help from a NATO coalition and an overall cost in fighting and reconstruction to the United States of more than $1 trillion.
The war turns 16 in October and America is pressing NATO partners to increase their own troop levels in the country to help Afghan forces get the upper hand in the grinding battle against the Taliban and the Islamic State group.
The resurgent Taliban have promised to turn Afghanistan into a “graveyard” for foreign forces and have been mounting deadly attacks as they maintain their grip on large swathes of the country.
As of February only about 60 percent of Afghanistan’s 407 districts were reported to be under government control, according to the US watchdog agency SIGAR.
Under Trump’s plan, the US is sending more than 3,000 additional troops to Afghanistan, on top of the 11,000 already on the ground, to train and advise the country’s security forces.
NATO allies have around 5,000 troops deployed around the country.
Critics have questioned what the extra US soldiers can accomplish that previous forces — who numbered some 100,000 at the height of the fighting — have not.
Earlier this year Ghani ordered a near-doubling of the country’s Special Operations Command -– the elite fighting force spearheading Afghanistan’s war against insurgents — from 17,000 as part of a four-year plan that also aims to strengthen Afghanistan’s air force.
While Afghan authorities have welcomed Trump’s open-ended commitment to increase US troop numbers, they know it will take time to improve the fighting abilities of their own forces.
Afghanistan’s soldiers have been severely demoralised and weakened by huge casualties, desertions and corruption.
In an acknowledgement of their impotence, the government is considering a plan to train and arm 20,000 civilians to defend territories where Islamic militants have been driven out.
Earlier this week SIGAR criticised US efforts to train Afghanistan’s security forces, saying they were being hampered by slapdash instruction, shoddy oversight and failures in governance.
John Sopko, the Special Inspector General for Afghanistan Reconstruction, whose agency provides independent oversight of reconstruction programmes, said the US was woefully unprepared to take on the challenge of creating security forces of the size and scope needed in Afghanistan.
Mattis flew to Kabul from New Delhi where he met his Indian counterpart Nirmala Sitharaman, who made it clear that India would not deploy troops to Afghanistan as part of Trump’s strategy.