Textile effluents have a complex waste composition due to the various compounds present and their resistance to degradation. Given the harmful effects of these pollutants on aquatic ecosystems, adequate treatment before disposal is essential, usually involving chemical processes such as coagulation and flocculation. This study optimizes textile wastewater treatment using Moringa oleifera as a natural coagulant through Rotational Central Composite Design (RCCD), a type of Response Surface Methodology (RSM), aiming to improve color removal, a key factor for effluent quality. By exploring Moringa oleifera as a sustainable alternative, the research provides new insights into environmentally friendly coagulant use and treatment optimization. The treatment’s effectiveness depends on the coagulant dosage, the energy applied, and the pollutant concentration. Dye removal was evaluated using spectrophotometry, and the evaluated factors in the optimization process were slow and fast mixing times, coagulant dosage, and pollutant concentration. The study identified pollutant concentration and slow mixing time as the most influential factors in treatment effectiveness. The model achieved a coefficient of determination (R²) of 87.9 %, and maximum dye removal reached 80.2 % under optimal conditions: 30 mL of coagulant, 20 min of slow mixing, 2 min of fast mixing, and a pollutant concentration of 300 mg ∙ L−1. The average removal efficiency was 47.86 %, indicating that natural coagulants offer a viable alternative for textile effluent treatment.