The prevalence and role of malnutrition in periprosthetic joint infection (PJI) remain unclear. This study aimed to use measurable nutritional screening tools to assess the prevalence of malnutrition in PJI patients during two-stage exchange arthroplasty and to explore the association between malnutrition and treatment failure. Our study retrospectively included 183 PJI cases who underwent 1st stage exchange arthroplasty and had available nutritional parameters, of which 167 proceeded with 2nd stage reimplantation. The recently proposed Musculoskeletal Infection Society (MSIS) Outcome Reporting Tool was used to determine clinical outcomes. The Controlling Nutritional Status (CONUT), Nutritional Risk Index (NRI), and Naples Prognostic Score (NPS) were used to identify malnutrition at 1st and 2nd stage exchange, respectively. Multivariate logistic regression analyses were performed to determine the association between malnutrition and treatment failure. Restricted cubic spline models were further used to explore the dose–response association. Additionally, risk factors for moderate-to-severe malnutrition were evaluated. Malnourished patients identified by CONUT, NPS, and NRI accounted for 48.1% (88/183), 98.9% (181/183), and 55.7% (102/183) of patients at 1st stage, and 9.0% (15/167), 41.9% (70/167), and 43.1% (72/167) at 2nd stage, indicating a significant improvement in nutritional status. We found that poorer nutritional status was a predictor of treatment failure, with CONUT performing best as a predictive tool. Moderate-to-severe malnutrition at 1st stage identified by CONUT was significantly related to treatment failure directly caused by PJI (odds ratio [OR] = 5.86), while the OR was raised to 12.15 at 2nd stage (OR = 12.15). The linear dose–response associations between them were also confirmed (P for nonlinearity at both 1st and 2nd stage > 0.05). As for total treatment failure, moderate-to-severe malnutrition as determined by CONUT was associated with a 1.96-fold and 8.99-fold elevated risk at the 1st and 2nd stages, respectively. Age ≥ 68 years (OR = 5.35) and an increased number of previous surgeries (OR = 2.04) may be risk factors for moderate-to-severe malnutrition. Overall, the prevalence of malnutrition in PJI patients is very high. Given the strong association between moderate-to-severe malnutrition identified by CONUT and PJI treatment failure, COUNT could be a promising tool to evaluate the nutritional status of PJI patients to optimize treatment outcomes.