The incident took place late on Friday after a rocket fired by militants landed in the detention facility.
The Ministry of Defense (MoD) spokesman, Gen. Zahir Azimi confirmed that 26 prisoners were injured following the attack.
Gen. Azimi further added that the injured prisoners were shifted to hospital and their health condition have been reported stable.
The Taliban militants group claimed responsibility behind the attack on detention facility.
Zabiullah Mujahid, a spokesman for the Taliban group claimed that the Bagram air base came under rocket attack for at least three times on Friday.
Mujahid said heavy casualties were incurred following the rocket attacks.