Chemical oxygen demand (COD) and total organic carbon (TOC) removal efficiencies of saline wastewater treatment indicate the efficiency of the electrochemical oxidation process. Therefore, the main target of this paper is to simultaneously increase COD and TOC removal efficiencies using artificial intelligence and modern optimization. Firstly, an accurate model based on ANFIS was established to simulate the electrochemical oxidation process in terms of reaction time, pH, salt concentration, and DC applied voltage. Compared with ANOVA, thanks to ANFIS modelling, the RMSE values are decreased by 84% and 86%, respectively, for COD and TOC models. Additionally, the coefficient of determination values increased by 3.26% and 7.87% for COD and TOC models, respectively. Secondly, the optimal reaction time values, pH, salt concentration, and applied voltage were determined using the hunger games search algorithm (HGSA). To prove the effectiveness of the HGSA, a comparison with a slime mold algorithm, sine cosine algorithm, and Harris’s hawks optimization was conducted. The optimal values were found at a pH of 8, a reaction time of 36.6 min, a salt concentration of 29.7 g/L, and a DC applied voltage of 9 V. Under this condition, the maximum COD and TOC removal values were 97.6% and 69.4%, respectively. The overall efficiency increased from 76.75% to 83.5% (increased by 6.75%).