According to interior ministry officials, the National Directorate of Security chief was injured in his lower body by the blast.
The Taliban said the attacker had posed as a peace messenger, the BBC reports.
It is unclear how the Taliban managed to get so close to one of the top targets in the country, the report said.
The bombing took place in one of many guesthouses used by Khalid, who has been using as many as 20 different houses in Kabul to reduce the risk of attack, it added.
The report quoted an intelligence official, as saying that Khalid was 'safe'.
The official, however, did not elaborate on his condition.
'Good' Taliban orders 'bad' Taliban out of their area
BBC director-general quits over false child abuse report
PCB chief Ashraf satisfied with security arrangements
India-born Khalid enters House of Lords
Sports ministry derecognises boxing and archery associations