Abstract The present work deals with the anaerobic treatment of molasses-bearing pharmaceutical wastewater using a specifically designed downflow anaerobic bioreactor (DFAB). The capacity of the designed DFAB was 1,000 L of adequate volume with necessary operational controls. Two types of anaerobic treatment, i.e. mesophilic and thermophilic treatments, were applied to the anaerobic biotransformation of wastewater under investigation. The efficiency of both treatments was compared in terms of reducing biochemical oxygen demand (BOD) and chemical oxygen demand (COD) load, as well as methane production. The anaerobic digestion process was carried out with the help of bacterial strains. The bacterial strains used in the mesophilic operation were acclimatised and utilised for the thermophilic treatment, which is a cost-effective and sustainable approach. A significant reduction in BOD and COD content of the wastewater was noticed after 10 days of retention time. Nearly 72–83% and 80–90% reduction in BOD values were recorded under mesophilic and thermophilic operations, respectively. Approximately 73–86% and 82–93% of COD content were reduced by mesophilic and thermophilic treatment, correspondingly. Methane production of 67 and 74% was achieved under mesophilic and thermophilic treatment, respectively. The designed DFAB showed remarkable treatment efficiency for wastewater and methane production.