Afghan security forces say they have arrested three Pakistanis for allegedly plotting to kill the outgoing US envoy.
Mr Khalilzad is about to take up the post of ambassador in Iraq
The men were caught with grenades and assault rifles on Sunday in Laghman province, near where Zalmay Khalilzad planned to open a road, officials say.
Afghan television channels broadcast footage of the three men giving their names in custody, but not confessing.
The US embassy neither confirmed nor denied the apparent plot, saying it could not comment on security matters.
Afghan television quoted national deputy intelligence chief Abdullah Laghmanai as saying the men were aged 19, 20 and 23, and from Peshawar in Pakistan.
"The intelligence agents who were chasing them a day prior to their arrest recorded a tape in which they've confessed that they were planning to assassinate Khalilzad," Mr Laghmanai was quoted as saying.
Off to Iraq
The BBC's Andrew North in the capital, Kabul, says it is not clear how serious the alleged plot was.
He says Zalmay Khalilzad, an Afghan himself, has always been closely guarded against the threat from militant groups seeking to target the high-profile representative of the country which drove the Taleban from power.
Mr Khalilzad was visiting Laghman province east of Kabul to inaugurate reconstruction projects. The engagement was one of his last before finishing his post - and in the district where his family comes from.
The three men were arrested metres away from a road which he had been due to open. He later cancelled the appearance.
The envoy has now left Afghanistan and is soon due to take over as the new US ambassador in Iraq.
It is unclear which group, if any, the men belong to.
Pakistan's Foreign Ministry spokesman, Jalil Abbas Jilani, said: "Pakistan condemns all acts of terrorism. We are confident that Afghan authorities will properly investigate the matter in order to ascertain the identity and motives of the plotters."