High glucose levels can lead to the apoptosis of islet β cells, while autophagy can provide cytoprotection and promote autophagic cell death. Vitamin B12, a water-soluble B vitamin, has been shown to regulate insulin secretion and increase insulin sensitivity. However, the precise mechanism of action remains unclear. In this study, we investigated the influence of vitamin B12 on high glucose-induced apoptosis and autophagy in RIN-m5F cells to elucidate how vitamin B12 modulates insulin release. Our results demonstrate that exposure to 45 mM glucose led to a significant increase in the apoptosis rate of RIN-m5F cells. The treatment with vitamin B12 reduced the apoptosis rate and increased the number of autophagosomes. Moreover, vitamin B12 increased the ratio of microtubule-associated protein 1 light chain 3 beta to microtubule-associated protein 1 light chain 3 alpha (LC3-II/LC3-I), while decreasing the amount of sequestosome 1 (p62) and inhibiting the phosphorylation of p70 ribosomal protein S6 kinase (p70S6K) under both normal- and high-glucose conditions. The additional experiments revealed that vitamin B12 inhibited high glucose-induced apoptosis. Notably, this protective effect was attenuated when the autophagy inhibitor 3-methyladenine was introduced. Our findings suggest that vitamin B12 protects islet β cells against apoptosis induced by high glucose levels, possibly by inducing autophagy.