Microbial Fuel Cells (MFCs) can simultaneously treat wastewater and generate bioelectricity. This study aimed to optimize operational parameters for treating wastewater from the pharmaceutical industry and harnessing bioelectricity generated from the organic components within the wastewater. The conditions for the bioelectricity generation bioprocess —including time (1-166 days), temperature (25–60°C), pH (4.5–7.5), and additive concentrations (10-50g)—were optimized by the method of Box-Behnken Design (BBD) through the principles of Response Surface Methodology (RSM) incorporated into Design Expert software. The open circuit voltage, current, as well as the physicochemical properties of the wastewater in the MFC were closely monitored. The initial Chemical oxygen demand (COD) and Biochemical oxygen demand (BOD) were 1025 and 1346.17 mg/L. The prominent microorganism in both wastewater and fruit waste samples were Esherichia coli, Staphylococcus species, and Salmonella. At optimized conditions (87 days, 42.5oC, pH of 7.5, and 30 g of additives) the maximum voltage of 895 mV and current of 264 mA were obtained. The result illustrated that fruit waste significantly influenced the generation of bioelectricity as well as the reduction of COD and BOD. The maximum power density generated from pharmaceutical wastewater with no fruit waste was 736.13 mW/m2 while the maximum power densities obtained with the addition of pineapple, orange, mango and combination of all the fruit wastes to the pharmaceutical wastewater were 1610.29, 1355, 759.08 and 2168 mW/m2, respectively. These results illustrate the optimum process conditions which can be explored for bioelectricity generation as well as bio-treatment of industrial wastewater.