The suicide attack happened late afternoon at the centre, which offers training and courses for students in higher education in a western district of Kabul.
A suicide bombing at an education centre in Kabul has killed at least 18 people and wounded dozens.
Interior Ministry spokesperson Tariq Arian said security guards identified a bomber who detonated explosives in the street outside the Kawsar-e Danish educational centre.
"A suicide bomber wanted to enter the education centre," Arian said in a statement.
"But he was identified by the centre's guards after which he detonated his explosives in an alley."
He said the attack had left at least 18 people dead and 57 wounded.
The suicide attack, which also wounded 57, happened late afternoon at the centre, which offers training and courses for students in higher education in a western district of Kabul.
Daesh claims responsibility
Daesh claimed responsibility for the bombing, the terror group said in a statement on Telegram, without providing evidence.
The attack came in an area of west Kabul that is home to many from the Shia community, a minority in Afghanistan targeted by groups such as Daesh in the past.
In the same area of Kabul, dozens of students died in an attack on another education centre in 2018, while in May gunmen attacked a maternity ward, killing 24, including mothers and babies.
Students killed, injured - witness
Witness Ali Reza said the blast sent dust and smoke swirling all around him.
"I was standing about 100 metres from the centre when a big blast knocked me down," said Reza, who had gone to hospital with his cousin, who was wounded in the blast.
"Dust and smoke were all around me. All those killed and wounded were students who wanted to enter the centre."
Residents later gathered at the site where pools of dried blood could be seen where the bomber had detonated his explosives-laden vest.
The attack came at a sensitive time as teams for the insurgents and government meet in Qatar to seek a peace deal even as violence rises and the United States withdraws troops.
A Taliban spokesman on Twitter denied responsibility for the attack.
There has been an upsurge in violence between Taliban and Afghan forces in the country, even as representatives from the two warring sides begin peace talks in Doha to end the decades-long war in Afghanistan.
The US signed a peace deal with the Taliban in February, opening up a path toward withdrawing American troops from the conflict.
Roadside bomb attacks
Earlier on Saturday, a roadside bomb killed nine people in eastern Afghanistan after it struck a minivan full of civilians, a local official said.
READ MORE: Afghan roadside bomb targets passenger bus
Ghazni province police spokesman Ahmad Khan Sirat said that a second roadside bomb killed two policemen after it struck their vehicle that was making its way to the victims of the first explosion.
Sirat added that the bombings had wounded several others and that the attacks were under investigation.
No one immediately claimed responsibility for the attacks. The provincial police spokesman claimed the Taliban had placed the bomb.