Officials said the incident is being investigated, and no further details were immediately available.
During his talks with Ghani, Pompeo said the two leaders had a chance to discuss the progress Afghanistan is making to prepare for elections this fall.
NATO's training and assistance mission in Afghanistan, Resolute Support, said in a statementthat the two US service members injured in the July 7 incident were in stable condition and that an investigation was under way. In that incident, a Romanian soldier was injured.
The incident happened at an Afghan army base in Uruzgan Province in southern Afghanistan, according to a USA official.
Pompeo also added, perhaps optimistically given Afghanistan's long history of resisting foreign forces, that the Taliban were "beginning to see that they can not wait us out".
Their statement reportedly said that four foreign soldiers had been killed and three wounded at the Tarinkot airport.
The success of this operation could put the Trump administration in a position to signal that one of its vital objectives in Afghanistan has been met, namely smashing the Islamic State.
Pompeo left Afghanistan for the United Arab Emirates, where he will meet Abu Dhabi's powerful crown prince, Sheikh Mohammed bin Zayed Al Nahyan, a staunch US ally, amid his country's war in Yemen.
American casualties have fallen dramatically since the withdrawal of US-led North Atlantic Treaty Organisation combat troops at the end of 2014. But as NPR's David Welna reported last week, a "public information blackout" by the Trump administration has meant that, "since late previous year, the Pentagon's stopped posting those numbers for Iraq, Syria and Afghanistan".
A USA soldier killed in Afghanistan was identified late on Sunday as Cpl.
Cultural misunderstandings and combat stress have also been named as the cause in previous attacks.
Miller's deployment to Afghanistan, which would see him promoted to four-star general, comes at a time when local security forces are still struggling to contain a resurgent Taliban.
The last insider attack that resulted in a United States casualty occurred in June past year.