Background: Contraindications and precautions to metformin have limited inpatient use, and limited evidence exists evaluating metformin in hospitalized patients. Objective: This study aimed to determine the safety and efficacy of inpatient metformin use. Methods: This study was an observational, retrospective, cohort study at an academic medical center between June 1, 2016, and May 31, 2018. Hospitalized adults with type 2 diabetes mellitus receiving at least 1 metformin dose were included. The primary endpoint was to identify hospitalized patients using metformin with at least 1 contraindication or precautionary warning against use. Secondary endpoints included assessing metformin efficacy with glycemic control, characterizing adverse outcomes of inpatient metformin, and comparing the efficacy of metformin-containing regimens. Results: Two hundred patients were included. There were 126 incidences of potentially unsafe use identified in 111 patients (55.5%). The most common reasons were age ≥65 years (47%), heart failure diagnosis (7.5%), and metformin within 48 hours of contrast (6%). Metformin was contraindicated in 2 patients (1%) with an estimated glomerular filtration rate ≤30 mL/min/1.73 m2. The overall median daily blood glucose was 146 mg/dL (interquartile range [IQR] = 122-181). Patients were divided into 3 groups: metformin monotherapy, metformin plus oral antihyperglycemic therapy, and metformin plus insulin. The median daily blood glucoses were 129 mg/dL (IQR = 110-152), 154 mg/dL (IQR = 133-178), and 174 mg/dL (IQR = 142-203; P < .001), respectively. Two patients (1%) developed acute kidney injury, and no patients developed lactic acidosis. Conclusions: Metformin was associated with goal glycemic levels in hospitalized patients with no adverse outcomes. These results suggest the potential for metformin use in hospitalized, non–critically ill patients.