Malaysia's growing population and industrialisation have increased solid waste accumulation in landfills, leading to a rise in leachate production. Leachate, a highly contaminated liquid from landfills, poses environmental risks and affects water quality. Conventional leachate treatments are costly and time-consuming due to the need for additional chemicals. Therefore, the Electrocoagulation process could be used as an alternative method. Electrocoagulation is an electrochemical method of treating water by eliminating impurities by applying an electric current. In the present study, the optimisation of contaminant removal was investigated using Response Surface Methodology. Three parameters were considered for optimisation: the current, concentration of leachate, and the electrodes’ distance. The outcome of this study includes ANOVA analysis, mathematical modelling and 3D surface plot modelling. The optimum condition for contaminants removal was obtained at a current of 4 Amp, a concentration of leachate of 90.95%, and an electrode distance of 3 cm. The outcomes obtained under these conditions were about 47.85% and 76.32% removal of COD and turbidity, respectively. Both percentage COD and turbidity removal models achieved significant results, demonstrating that at least one of the independent variables has a significant impact on the dependent variable.