Gunmen disguised as doctors stormed Sardar Daud Khan hospital in Kabul last month, with multiple surviving staff telling AFP that insiders including two interns were among the attackers.
The military head of intelligence and the official in charge of medical support were among those who have been dismissed and will face prosecution, the defence ministry said.
"They have been sacked for negligence of duty over the hospital attack," ministry spokesman Mohammad Radmanish told AFP.
The defence ministry denies that insiders were involved and asserts that only 50 people were killed. But security sources and the survivors, some of whom counted bodies, told AFP that the death toll exceeded 100.
More From This Section
Public anger has grown over the episode, with speculation swirling on social media that such a brazen attack on the tightly guarded hospital could not have happened without the complicity of high-ranking officials.
The savagery of the assault was characterised by how the assailants stabbed bedridden patients, threw grenades into crowded wards and shot people at point-blank range.
But the survivors whom AFP spoke to said the attackers chanted "Long live Taliban" in Pashto and attacked all but two wards on the hospital's first floor, where Taliban patients were admitted.