Al-Masri’s killing comes as peace talks continue in Qatar between the Taliban and the Afghan government in a bid to end the country’s long-running war.
The negotiations were organised after a deal between the United States and the Taliban in February, under which the militants agreed to not allow Afghan soil to be used by foreign extremists.
The Taliban government’s sheltering of al-Qaeda was the original reason for the US invasion of Afghanistan after the September 11, 2001, attacks.
Efforts to bring peace to Afghanistan have been complicated, however, because of ongoing attacks by Islamic State militants.
In the latest IS-claimed attack, a suicide bomber struck near an education centre in a western district of Kabul on Saturday.
The death toll from the bombing climbed to 24 on Sunday, according to the interior ministry.
Ministry spokesman Tariq Arian said another 57 people had been wounded.
Residents in several districts of western Kabul belong to the minority Shiite Hazara community, and are often targeted by Sunni extremists of IS.
A Ministry of Interior spokesman, Tariq Arian, said security guards had identified a bomber who detonated explosives in the street outside the Kawsar-e Danish centre.
Most of the victims were students aged between 15 and 26, according to the health ministry. Fifty-seven were injured in the attack, the interior ministry said.
A Taliban spokesman on Twitter denied responsibility for the attack, which came at a sensitive time as teams representing the insurgents and the government meet in Qatar to seek a peace deal.
Islamic State claimed responsibility in a statement on Telegram, without providing evidence.
Family members gathered at a nearby hospital, searching for missing loved ones among bags containing the remains of those killed, laid out on the hospital floor, while outside orderlies wheeled injured patients on stretchers for treatment, a Reuters witness said.
The attack, which was condemned by NATO and the Afghan government, took place in an area of west Kabul that is home to many from the country’s Shia community, a religious minority in Afghanistan targeted in the past by groups such as Islamic State.
Dozens of students died in the same area of Kabul in an attack on another education centre in 2018.