China has taken the unusual step of a hosting a delegation of Afghan Taliban officials, creating a potential new avenue for peace negotiations between the insurgents and the government in Kabul.

Current and former Afghan officials said a group of Taliban representatives traveled last month to China to discuss the possibility of opening talks with the Afghan government.

“The...