Serum magnesium (Mg) is reported to be reduced in individuals with obesity, hypertension, and diabetes mellitus and has been suggested as a marker for metabolic syndrome. We have studied changes in serum Mg concentrations in a group of obese patients (n = 92) with and without diabetes mellitus after weight loss induced by dieting and bariatric surgery. At inclusion, 11% (10/92) of the population had severe Mg deficiency (< 0.75 mmol/L) and median serum Mg was lower in diabetic (n = 20) compared to non-diabetic (n = 72) patients (p = 0.002). A weight loss of 10 kg after 8 weeks of lifestyle interventions was accompanied by increased serum Mg of about 5% in both diabetic and non-diabetic patients. Serum Mg remained stable thereafter in the non-diabetic patients, while it continued to increase in the diabetic patients after bariatric surgery. Six months after bariatric surgery, there was no significant difference in serum Mg concentration between the groups (p = 0.08). The optimal range of circulating Mg concentration is not known, but as even small increments in serum Mg are reported to lower the risk of cardiovascular and ischemic heart disease, our results are interesting in a public health perspective.