Introduction Chronic metabolic disorders such as diabetes mellitus (DM) are becoming a global health concern. According to recent studies, the pathophysiology of DM may involve factors other than traditional glycemic control, such as electrolyte balance and thiamin status. Therefore, this study evaluated the relationship between sodium and potassium and serum thiamin levels in patients with type 1 and type 2 DM. Methods This study was conducted in multiple diabetic outpatient clinics and centers in Karachi, Pakistan, using a non-probability convenience sampling method. The study lasted for approximately six months after the synopsis was approved. A total of 64 patients were selected, 32 of whom each had type 1 and type 2 DM. All patients who were between the ages of 25 and 46 years old and had either type 1 or type 2 DM were included in the study. A Mann-Whitney test and an independent t-test were used to compare the means between the two study groups. Pearson's correlation and chi-square tests were used to determine the variables, correlations, and associations with type 1 and type 2 DM. Results The study findings showed that the distribution of gender among diabetic patients revealed that among males, eight (25.0%) had type 1 DM, and 10 (31.2%) had type 2 DM. Among females, 24 (75.0%) had type 1 DM, and 22 (68.8%) had type 2 DM. Significant correlations were observed in the means of blood glucose levels, such as glycated hemoglobin (HbA1c), fasting blood sugar (FBS), and serum thiamin levels, among patients with type 1 and type 2 DM (p < 0.001). The HbA1c, FBS, and serum thiamin levels were significantly higher in type 2 DM patients than in type 1 DM patients. Among patients with type 1 DM, sodium levels were not substantially correlated with thiamin levels (p = 0.570, r = 0.104), whereas potassium levels were significantly correlated with thiamin levels (p = 0.005, r = 0.263). Conclusion We conclude that the sodium level was not significantly correlated with serum thiamin status in type 1 and type 2 DM, whereas a low positive correlation was observed between potassium and serum thiamin levels in type 1 DM. However, there was no significant correlation concerning potassium levels in type 2 DM.