Cyanocobalamin injection is used to treat and prevent a lack of vitamin B12 that may be caused by any of the following: pernicious anemia (lack of a natural substance needed to absorb vitamin B12 from the intestine); certain diseases, infections, or medications that decrease the number of vitamin B12 absorbed from food; or a vegan diet (a strict vegetarian diet that does not allow any animal products, including dairy products and eggs). Lack of vitamin B12 may cause anemia (a condition in which the red blood cells do not bring enough oxygen to the organs) and permanent damage to the nerves. Cyanocobalamin injection also may be given as a test to see how well the body can absorb vitamin B12. Cyanocobalamin injection is in a class of medications called vitamins. Because it is injected straight into the bloodstream, it can be used to supply vitamin B12 to people who cannot absorb this vitamin through the intestine.