The remarks came weeks after Pakistan's former president Pervez Musharraf warned that the departure of NATO combat forces from Afghanistan could push India and Pakistan towards a proxy war.
"The relation becomes lethal when state actors embrace and sponsor these non-state actors, providing them with resources and sanctuaries, and use them as proxies in their competition against other states," he said in his speech at the South Asian Association for Regional Cooperation (Saarc) summit in the presence of the Pakistani and Indian prime ministers.
Former Afghan president Hamid Karzai also disputed Musharraf's claim and ruled out any proxy war in Afghanistan when he spoke at a seminar in New Delhi last week.
Pakistan foreign ministry spokesperson hailed Ghani's remarks.
"The statements of Afghan leadership are very encouraging who say that they will not allow Afghan territory to be used against any neighbour and will also not allow proxy war on its territory," Xinhua quoted spokesperson Tasnim Aslam as saying.
Answering a question at her weekly briefing, she said Pakistan was practising the policy of non-interference in Afghanistan and expected that everyone else also followed this.
The spokesperson said relations between Pakistan and Afghanistan were broadening and deepening after the installation of the new government in Afghanistan. She reiterated that Pakistan wanted stability, peace and prosperity in Afghanistan.