The explosion struck inside the ministry, killing Refugee Minister Khalil Haqqani, officials said.
The officials provided no further details and spoke on condition of anonymity because they were not authorised to speak to the media.
Khalil Haqqani is the uncle of Sirajuddin Haqqani, the acting interior minister who leads a powerful network within the Taliban.
Haqqani was the most high-profile casualty of a bombing in Afghanistan since the Taliban returned to power three years ago.
There was no immediate claim of responsibility for the blast.
In March 2023, a bomb killed a Taliban-appointed provincial governor Daud Muzmal and two others in Afghanistan's Mazar-e-Sharif, the capital of Balkh province.
Pakistan's Foreign Minister Ishaq Dar condemned the killing of Haqqani.
Dar, who is also deputy prime minister, wrote on the X platform that he was "deeply shocked" at the killing of Haqqani and "loss of precious lives as a result of a terrorist attack" in Kabul.
"We offer our heartfelt condolences," he said, adding, "Pakistan unequivocally condemns terrorism in all its forms and manifestations".
The Islamic State group's affiliate, a major rival of the ruling Taliban, has carried out previous attacks across Afghanistan.
In early September, a suicide bomber in the southwestern Qala Bakhtiar neighbourhood in Kabul killed at least six people and wounding 13 others.
IS had claimed responsibility for the attack.