Hydroxychloroquine sulfate (HCQ), an against-COVID-19 drug, is a dangerous organic compound in wastewater. In this study, 0.6 L of an HCQ solution (50 mg L-1) was electro-oxidized in a batch electrochemical cell (BEC) with two boron-doped diamond (BDD) electrodes. The optimal operating conditions were established by DoE-driven non-convex constrained optimization. A central composite rotatable design (CCRD) was applied to model the chemical oxygen demand (COD) removal efficiency and to evaluate the influence of current density (j): 10-120 mA cm-2, initial pH: 2-12, and stirring speed (Omega): 400-600 rpm. Experimental results were modeled by a reduced third-order polynomial function having a determination coefficient (R2), root mean square error (RMSE), mean square error (MSE), and coefficient of variation (C.V.) of 0.9906, 0.0460, 0.0021, and 3.72%, respectively. This validates the predictive capacity of the fitted model and the efficiency of the employed electro-oxidation process. The optimal operating vector was j = 46.36 mA cm-2, pH0 = 12.04, and Omega = 584 rpm within 5 h of reaction time, attaining a maximum COD removal efficiency of 85.55% with an energy consumption of 1.24 kW h L-1 and a total operating cost of 0.067 USD$ L-1. Also, a total organic carbon removal of 52.5% was achieved. Additionally, mathematical models were established to fit the temporary profiles of HCQ degradation, COD, and TOC removal. The estimated apparent kinetic constants (kapp) were 1.21 h-1, 0.26 h-1, and 2.65 mg L-1 h-1, respectively. Finally, it was concluded that the assessed electrochemical process could help mineralizing wastewater containing HCQ.