Xi travels to the Russian city of Ufa for a summit on Thursday and Friday of leaders of the Shanghai Cooperation Organisation (SCO), which groups China, Russia, Kazakhstan, Kyrgyzstan, Tajikistan and Uzbekistan.
It will be preceded by a meeting of leaders of the BRICS group of emerging economies -- Brazil, Russia, India, China and South Africa.
"Due to the spillover effect of the Islamic State terrorist activities, Afghanistan now faces a grim security situation," Chinese vice foreign minister Cheng Guoping told reporters.
Read: Pakistan, India to start process of joining China security bloc
SCO leaders "will certainly have in-depth discussions on the Afghan issue", he added. "And they will talk further about how to respond to the security situation there."
China is seeking business interests in Afghanistan and is sensitive to any spillover of extremism from the country, which has a short border with its mostly Muslim western region of Xinjiang.
Afghanistan's militant Taliban are seeking to halt defections to IS after some insurgents adopted its flag to rebrand themselves as a more lethal force as NATO troops depart the country.
Last month the Taliban warned the leader of IS group against waging a parallel insurgency in Afghanistan, after reported clashes between militants loyal to the two groups.
Afghanistan has "observer" status in the SCO, along with India, Iran, Mongolia and Pakistan, according to the group's website.
Cheng also said that China remained on guard against the East Turkestan Islamic Movement (ETIM) it says foments unrest in Xinjiang among the region's ethnic Uighurs, though many analysts outside China have questioned whether any large scale organisation of the kind exists.
Read: Open letter: Taliban warn IS to stay away from Afghanistan
"It has participated in some terrorist activities of the IS," he said of ETIM. "China is concerned about that and we will also maintain security cooperation with relevant countries."
Besides the group summits, Xi will hold bilateral talks with Putin in their eighth such meeting since Xi became president in 2013. Xi visited Russia in May to witness a vast military parade at Red Square to commemorate the defeat of Nazi Germany in 1945.
"The Chinese and Russian leaders have established a very good working relationship and personal friendship," Cheng said, adding: "As permanent members of the (UN) Security Council a sound relationship between these two countries plays an important role in promoting world peace".
He said they will discuss bilateral relations, including economic cooperation and "specific cooperation projects", without elaborating.
Russia -- which invaded Afghanistan in 1979 and occupied it for a decade -- has strengthened ties and trade with China since coming under Western sanctions for its actions in Ukraine.
Russia became China's top crude supplier in May for the first time in a decade, Bloomberg News reported last month, as Moscow seeks new markets for its oil.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ