Metformin is widely used in the treatment of Type 2 Diabetes Mellitus (T2DM). However, it is known to have beneficial effects in many other conditions, including obesity and cancer. In this study, we aimed to investigate the metabolic effect of metformin in T2DM and its impact on obesity. A mass spectrometry (MS)-based metabolomics approach was used to analyze samples from two cohorts, including healthy lean and obese control, and lean as well as obese T2DM patients on metformin regimen in the last 6 months. The results show a clear group separation and sample clustering between the study groups due to both T2DM and metformin administration. Seventy-one metabolites were dysregulated in diabetic obese patients (30 up-regulated and 41 down-regulated), and their levels were unchanged with metformin administration. However, 30 metabolites were dysregulated (21 were up-regulated and 9 were down-regulated) and then restored to obese control levels by metformin administration in obese diabetic patients. Furthermore, in obese diabetic patients, the level of 10 metabolites was dysregulated only after metformin administration. Most of these dysregulated metabolites were dipeptides, aliphatic amino acids, nucleic acid derivatives, and urea cycle components. The metabolic pattern of 62 metabolites was persistent, and their levels were affected by neither T2DM nor metformin in obesity. Interestingly, 9 metabolites were significantly dysregulated between lean and obese cohorts due to T2DM and metformin regardless of the obesity status. These include arginine, citrulline, guanidoacetic acid, proline, alanine, taurine, 5-hydroxyindoleacetic acid, and 5-hydroxymethyluracil. Understanding the metabolic alterations taking place upon metformin treatment would shed light on possible molecular targets of metformin, especially in conditions like T2DM and obesity.