The United States said it is committed to reducing the number of its troops in Afghanistan to 8,600 - from the current 13,000 - within 135 days of signing the deal, and working with its allies to proportionally reduce the number of coalition forces in Afghanistan over that period, if the Taliban adhere to their commitments.
"We are working to finally end America's longest war and bring our troops back home," said U.S President Donald Trump in a White House statement.
The accord represents a chance to make good on a longstanding promise to get troops out, as he seeks re-election in November. But security experts have also called it a foreign policy gamble that would give the Taliban international legitimacy.
Ghani said he hoped the Doha deal paves the way towards lasting peace, telling a news conference in Kabul:
"The nation is looking forward to a full ceasefire."
The Afghan government said it stood ready to negotiate and conclude a ceasefire with the Taliban, and it affirmed its support for the phased withdrawal of US and coalition forces subject to the Taliban's fulfilment of its commitments.
It also said that it remained committed to preventing militant groups from using its soil to threaten the security of the United States, its allies and other countries.
Hours before the deal, the Taliban ordered all its fighters in Afghanistan "to refrain from any kind of attack ... for the happiness of the nation."
"The biggest thing is that we hope the US remain committed to their promises during the negotiation and peace deal," said Zabiullah Mujahid, a spokesman for the hardline Islamist group.