Around 91 others were wounded in the assault, which comes as the Taliban intensify their nationwide offensive against the US-backed government.
The two bombers blew themselves up in rapid succession, in an attack apparently aimed at inflicting mass casualties as government workers left the ministry after work.
“The first explosion occurred on a bridge near the defence ministry. When soldiers, policemen and civilians rushed to the scene, there was the second explosion,” defence ministry spokesman Mohammad Radmanish told media.
Health ministry said 24 people were killed in the blasts.
The Italian-run Emergency Hospital in Kabul tweeted that it had so far received 10 injured people, with more expected to arrive.
President Ashraf Ghani strongly condemned the attack.
“The enemies of Afghanistan are losing the fight in the ground battle with security forces,” Ghani said in a statement. “That is why they are attacking, highways, cities, mosques, schools and ordinary people.”
Taliban spokesman Zabihullah Mujahid said on Twitter that the defence ministry was the object of the first attack, while police were targeted in the second.
The attack took place more than a week after 16 people were killed when militants stormed the AmericanUniversity of Afghanistan in Kabul, in a nearly 10-hour raid that prompted anguished pleas for help from trapped students.
Explosions and gunfire rocked the campus in that attack, which came just weeks after two university professors — an American and an Australian — were kidnapped at gunpoint near the school.
Their whereabouts are still unknown and no group so far has publicly claimed responsibility for the abductions, the latest in a series of kidnappings in the conflict-torn country.