The riot started on Thursday after prisoners attacked guards trying to carry out a cell search at Kabul's infamous Pul-e-Charkhi prison, which holds around 1,300 prisoners, including several hundred Taliban members.
Prison authorities said the search had been ordered to try and find weapons and cell phones after some employees at the jail were recently caught trying to smuggle in explosives used to make "suicide vests" and reports that prisoners were planning an escape attempt.
Afghan television reported that the situation in the prison was now under control.
The justice ministry representative justified the violence saying, "The prison's administration may use any means necessary to keep peace in the prison," adding that details of the incident had been handed over to the prosecutor's office.
The prison riot follows a recent hunger strike at the jail in protest at the conditions in the prison, which houses some of the most violent criminals in the country.
In June, 15 prison guards died when Taliban militants smashed a truck, laden with explosives, into a jail in the southern city of Kandahar freeing around a 1,000 prisoners and Taliban insurgents.