Background. There is a positive association between serum magnesium and hemoglobin levels in the general population. However, no studies have evaluated the association between serum magnesium and hemoglobin levels in patients with primary hyperparathyroidism (PHPT). We aimed to investigate whether there is a relationship between serum magnesium and hemoglobin levels in the patient population with PHPT. Methods. This retrospective study included 307 hospitalized PHPT patients who were continuously admitted to the Second Xiangya Hospital of Central South University, from January 2010 to August 2020. Laboratory and demographic data of patients were collected. Hypomagnesemia was defined as serum magnesium