A relationship between serum magnesium (Mg) and body composition parameters has not been reported in hemodialysis (HD) patients. We aimed to clarify whether serum Mg has any association with body composition parameters, or survival in HD patients. This study included 215 consecutive maintenance HD patients. Laboratory data collection and postdialysis body composition analysis were performed at baseline. The patients were divided based on baseline serum Mg level tertiles (low, medium, and high Mg groups). Kaplan-Meier survival, logistic regression analyses and Cox proportional hazard analyses were conducted. Among all patients, the median age and dialysis vintage were 73 (65-81) years and 44 (8-96) months, respectively. The serum Mg levels were < 2.3, 2.3-2.5, and > 2.5 mg/dL for the low (n = 67), middle (n = 76), and high (n = 72) Mg groups, respectively. Compared to other groups, low Mg group showed significantly higher age and C-reactive protein levels, but lower serum albumin, normalized protein catabolic rates and frequency of on-line hemodiafiltration. The low, middle, and high Mg groups differed significantly regarding body cell mass (fat-free mass without bone mineral mass and extracellular water) index (BCMI): [5.6 (4.2-6.8), 6.0 (4.8-8.1), 6.7 (4.9-7.5) kg/m2 , respectively] and overhydration/extracellular water ratio (OH/ECW) [11.7 (4.5-21.9), 4.8 (1.0-14.1), 8.5 (-0.5-15.0) %, respectively] but not regarding body mass index, lean tissue index, fat tissue index. Hypomagnesemia was significantly associated with BCMI [odds ratio (OR) [95% confidence interval (CI)]: 0.85 [0.73-1.00] and OH/ECW (OR [95% CI]: 1.03 [1.01-1.05]), respectively. Kaplan-Meyer 3-year survival rates were 53.6%, 69.7%, and 71.7% in low, middle, and high Mg groups, respectively. However, hypomagnesemia was not significantly associated with 3-year all-cause mortality independent of age, serum albumin and C-reactive protein. Hypomagnesemia was associated with lower BCMI, more pronounced OH/ECW and poorer Kaplan-Meier 3-year cumulative survival, but was not an independent risk factor for mortality in HD patients.