Mecobalamin is used to treat vitamin B12 deficiency. Vitamin B12 is important for the brain and nerves, and for the production of red blood cells. It is sometimes used in people with pernicious anemia, diabetes, and other conditions