Background/Objectives: Hypomagnesemia and hypocalcemia are common conditions among older adults that may contribute to cognitive decline. However, most of the existing research has focused primarily on dietary intake rather than the actual serum levels of these nutrients or examined them separately. This study aims to investigate the relationship between hypomagnesemia, hypocalcemia, and the concurrent presence of both deficiencies in relation to cognitive performance among seniors. Methods: A total of 1220 hospitalized patients aged 60 and older were included in the analysis. The participants were categorized into four groups: those with normal serum levels of magnesium and calcium, those with hypomagnesemia, those with hypocalcemia, and those with both serum magnesium and calcium deficiencies. To evaluate the potential influence of age, sex, common comorbidities, and disturbances in magnesium and calcium levels on cognitive performance, two general linear models were employed, using the Mini-Mental State Examination (MMSE) and Clock-Drawing Test (CDT) as dependent variables. Results: After adjusting for age, sex, body mass index, and comorbidities, the mean values for the MMSE and CDT were 23.33 (95%CI: 22.89–23.79) and 5.56 (95%CI: 5.29–5.83) for the group with normomagnesemia and normocalcemia, 22.59 (95%CI: 21.94–23.24) and 5.16 (95%CI: 4.77–5.54) for the group with hypomagnesemia, 19.53 (95%CI: 18.36–20.70) and 4.52 (95%CI: 3.83–5.21) for the group with hypocalcemia, and 21.14 (95%CI 19.99–22.29) and 4.28 (95%CI 3.61–4.95) for the group with both hypomagnesemia and hypocalcemia, respectively. Magnesium and calcium deficiencies contributed to MMSE and CDT variance in the general linear models. Conclusions: Our findings indicate that in addition to age, body mass index, and chronic heart failure, both hypomagnesemia and hypocalcemia are associated with reduced cognitive performance.