Abstract This present study investigates the comparative study of iron and aluminum electrodes for the treatment of landfill leachate by the Batch Electrocoagulation (EC) technique. The performance of EC was used to determine the removal efficiency of COD and Color. The effects of operating conditions such as electrode material, stirring speed, inter-electrode distance, electrolysis time, initial pH, and applied voltage were studied to evaluate the performance of the electrode. The electrodes were arranged in a monopolar mode by applying different cell voltages of 4, 6, 8, 10 and 12 V for 180 min of electrolysis time (ET) with a varying inter-electrode distance between 1 and 4 cm. The iron and aluminum electrodes can be successfully used as anodes and cathodes for the treatment process, which makes the process more efficient and easier to maintain. Based on the obtained results, it was observed that there was an increase in BOD/COD ratio from 0.11 to 0.79. The maximum removal of COD and Color was found to be 76.5% and 67.2% respectively, accomplished with 105 min optimum electrolysis time with a pH of 9.25 using an iron electrode. In the case of the aluminum electrode, the BOD/COD ratio was increased from 0.11 to 0.66. Over 78.4% of COD and 77.0% of Color removal was obtained with 90 min optimum electrolysis duration and pH 9.3 with an optimum 10 V and an optimum inter-electrode distance of 1 cm. However, the aluminum electrode is superior to iron as a sacrificial electrode material in terms of Color and COD removal efficiency. The aluminum electrode significantly treated landfill leachate by the electrocoagulation method under optimum experimental conditions.