The recycling of textile wastewater by membrane technology often necessitates intricate pretreatment steps to prevent severe membrane fouling, which lead to prolonged process-flow and elevated operation expenses. This research focuses on a two-step coagulation (TS-Co) pretreatment-nanofiltration process for treating real textile wastewater and examines its mechanism for controlling membrane fouling. The findings indicated that the removal of organic pollutants from real textile wastewater could be enhanced through first coagulation under acidic conditions, and the secondary coagulation under neutral conditions further removed the residual organics and the metal coagulants released at first stage. This synergistic effect led to chemical oxygen demand (COD) and turbidity removal efficiencies of 56.31 % and 99.29 %, respectively, which were superior to those of ultrafiltration (UF) and conventional coagulation (C-Co) pretreatment. The foulant composition and correlation analysis confirmed that protein, humic acid, and polysaccharides were the primary pollutants causing the fouling of nanofiltration membrane. Interestingly, the removal efficiency of polysaccharides using TS-Co (63.72 %) was lower than that obtained using UF (95.57 %), while the TS-Co exhibited higher removal efficiencies for humic acid and protein (97.43 % vs. 49.90 %, and 96.99 % vs. 81.07 %, respectively), indicating its excellent performance to controlling membrane fouling. Additionally, the proposed short process-flow offers cost advantages over conventional long process-flow and shows promising application prospects.