Dysmagnesemia is a serious disturbance of microelement homeostasis. The aim of this study was to analyze the distribution of serum magnesium concentrations in hospitalized patients according to gender, age, and result of hospitalization. The study was conducted from February 2018 to January 2019 at the Central Clinical Hospital in Warsaw. Laboratory test results from 20,438 patients were included in this retrospective analysis. When a lower reference value 0.65 mmol/L was applied, hypermagnesemia occurred in 196 patients (1%), hypomagnesemia in 1505 patients (7%), and normomagnesemia in 18,711 patients (92%). At a lower reference value of 0.75 mmol/L, hypomagnesemia was found in 25% and normomagnesemia in 74% of patients. At a lower reference value of 0.85 mmol/L, hypomagnesemia was found in 60% and normomagnesemia in 39% of patients. Either hypo- or hyper-magnesemia was associated with increased risk of in-hospital mortality. This risk is the highest in patients with hypermagnesemia (40.1% of deaths), but also increases inversely with magnesium concentration below 0.85 mmol/L. Serum magnesium concentration was not gender-dependent, and there was a slight positive correlation with age (p < 0.0001, r = 0.07). Large fluctuations in serum magnesium level were associated with increased mortality (p = 0.0017). The results indicate that dysmagnesemia is associated with severe diseases and generally severe conditions. To avoid misdiagnosis, an increase of a lower cut-off for serum magnesium concentration to at least 0.75 mmol/L is suggested.