This paper estimates the optimal input parameters of a two-chamber microbial fuel cell (TCMFC) by employing Harris hawk's optimization (HHO) and ANFIS modeling. The goal is to boost the output power density of TCMFC.Three operating input controlling parameters are taken into consideration: acetate concentration in the influent of the anodic chamber, fuel feed flow rate in the anodic chamber, and oxygen concentration in the influent of the cathodic chamber. Based on measured data, an ANFIS model has been created to simulate the power density of TCMFC in terms of the input controlling parameters. The modeling results proved the superiority of ANFIS-based model, the coefficient of determination is increased from 0.703 using Response surface methodology (RSM) to 0.993 using ANFIS (boosted by 41.25%.). Next, HHO is applied to do the parameter identification process. To prove the advantage of the proposed methodology, the findings are compared to RSM and experimental data. The integration between HHO and ANFIS-based modeling boosted the output power density of TCMFC by 8.7% and 9.7% compared to measured data and RSM, respectively. In sum, the proposed strategy succeeded in boosting the power density of the TCMFC.