Pregnant women with type 2 diabetes mellitus (T2DM) are at increased risk for miscarriages, birth defects, large infants, and stillbirths. Maintaining blood sugars in the normal range decreases these pregnancy complications. Currently, insulin is the primary medication used to treat pregnant women with T2DM. However, it is administered by injection several times a day and compliance is low in health disparity populations with high rates of obesity and diabetes. Insulin also has the potential to lead to dangerously low blood sugars. Metformin is a medication than can be administered as pills and is not associated with dangerous low blood sugars. In addition, this insulin sensitizer is the medication of choice for women who are obese and have T2DM outside of pregnancy. We hypothesize that metformin will achieve similar levels of blood sugar control compared to insulin. In doing so, metformin will prevent the increased risk of pregnancy complications associated with T2DM in pregnancy. The aims of this study is to determine if in pregnant women with T2DM, metformin achieves similar glycemic control, and similar maternal and neonatal outcomes when compared to insulin. We propose a pilot study of a randomized, controlled trial of metformin versus insulin in the treatment of T2DM during pregnancy.