Beijing has sought to maintain unofficial ties with the Taliban throughout the US' withdrawal from Afghanistan, which spurred an advance by the Islamist hardliners across the country that saw them capture the capital Kabul on Sunday.
China shares a rugged 76-kilometer (47-mile) border with Afghanistan.
Beijing has long feared Afghanistan could become a staging point for Muslim minority Uyghur separatists in Xinjiang.
But a top-level Taliban delegation met with Chinese Foreign Minister Wang Yi in Tianjin last month, promising that Afghanistan would not be used as a base for militants.
In exchange, China offered economic support and investment for Afghanistan's reconstruction.
Notably, the Taliban in Kabul takes over the power from the government after 20 years of fight with the US.
People with ties to Afghanistan blamed President Joe Biden for betraying the people of the war-torn country and demand sanctioning Pakistan as hundreds of people protested Sunday afternoon outside the White House.
Meanwhile, Ghani in his first comments after he left Afghanistan said he was faced with a "hard choice" between the "armed Taliban" who wanted to enter the Presidential Palace or "leaving the dear country that he dedicated his life to protect, the past 20 years".