Metformin is generally used to treat high blood sugar levels caused by type-2 diabetes. This is a type of diabetes in which the insulin produced by the pancreas fails to help the cells of the body get the required sugar, thus preventing the body from receiving the sugar needed to carry out body functions.