The Ministry of Interior (MoI) in a statement said the factories were destroyed during a special military operation conducted late on Tuesday night in the vicinity of Ghani Khel district.
The statement further added that the Afghan forces also discovered 7,500 kgs of morphine, 810 kgs of ammonium chloride, 500 liters of liquid opium, and some other types of chemicals and equipment used to produce heroin.
The chemicals and equipment were all destroyed on the spot, the Ministry of Interior added.
This comes as the Afghan forces are busy conducting operations to eradicate the fields from poppy cultivation as there has been a sharp rise in opium cultivation, production and smuggling across the country during the recent months.
According to the last survey report, there has been a 43 per cent rise in opium cultivation in Afghanistan.
The survey jointly conducted by the Afghan authorities and United Nations Office on Drugs and Crime, around 201,000 acres of land were cultivated with opium in 2016.
The report further added that estimates show a total of 4,800 metric tons of opium will be produced in 2016.