"While tragedy brought us together, there are common interests that now can be articulated very clearly," Ghani said in comments broadcast Sunday on CNN's "Fareed Zakaria GPS."
"The threats that we are facing on a daily basis, were they, God forbid, to overwhelm us, will threaten the world at large."
Ghani is due to meet US Secretary of State John Kerry and Defense Secretary Ashton Carter at Camp David outside Washington on Monday.
"The result is that America has been secure, thank God. There's been no terrorist attack on mainland United States. We have been the front line," he said.
Also Read
And in a separate interview with NPR to be broadcast Monday, he said that the majority of Afghans want the US military presence to continue.
"They see the United States as critical to their future," he said.
The United States is scrapping a plan to reduce the US force in Afghanistan to 5,500 by December, after American commanders appealed to keep more troops on the ground.
"What I am gratified to share is that during the last six months, the Afghan national security forces have really shown their mettle. Now we are not in a defensive position. We have taken offensive," he said.
Asked about the Islamic State extremist group, Ghani told NPR: "Terrorism is morphing into a system. It's becoming sophisticated. And more than anything else, it's controlling immense resources.
"So they are posing a threat, but we are determined to make sure that they do not do the kind of atrocities that they've managed so well in Syria, Iraq, Libya, or Yemen.