Background: Although IgA nephropathy (IgAN), an immune-mediated disease with heterogeneous clinical and pathological phenotypes, is the most common glomerulonephritis worldwide, it remains unclear which IgAN patients benefit from immunosuppression (IS) therapy. Methods: Clinical and pathological data from 4047 biopsy-proven IgAN patients from 24 renal centres in China were included. The derivation and validation cohorts were composed of 2058 and 1989 patients, respectively. Model-based recursive partitioning, a machine learning approach, was performed to partition patients in the derivation cohort into subgroups with different IS long-term benefits, associated with time to end-stage kidney disease, measured by adjusted Kaplan-Meier estimator and adjusted hazard ratio (HR) using Cox regression. Findings: Three identified subgroups obtained a significant IS benefits with HRs ≤ 1. In patients with serum creatinine ≤ 1·437 mg/dl, the benefits of IS were observed in those with proteinuria > 1·525 g/24h (node 6; HR = 0·50; 95% CI, 0·29 to 0·89; P = 0·02), especially in those with proteinuria > 2·480 g/24h (node 8; HR = 0·23; 95% CI, 0·11 to 0·50; P <0·001). In patients with serum creatinine > 1·437 mg/dl, those with high proteinuria and crescents benefitted from IS (node 12; HR = 0·29; 95% CI, 0·09 to 0·94; P = 0·04). The treatment benefits were externally validated in the validation cohort. Interpretation: Machine learning could be employed to identify subgroups with different IS benefits. These efforts promote decision-making, assist targeted clinical trial design, and shed light on individualised treatment in IgAN patients. Funding: National Key Research and Development Program of China (2016YFC0904103), National Key Technology R&D Program (2015BAI12B02).