Vitamin B12 (VB12)-a B-group vitamin with a porphyrin ring as its molecular core, coordinated to a cobalt ion (Co2+)-and Co2+ itself are both essential micronutrients for maintaining normal human physiological function. However, excessive cobalt exposure can induce adverse health effects, including thyroid disorders, asthma, lung disease, impaired cardiac output, vasodilatory dermatitis, and neurological abnormalities. Meanwhile, VB12 levels serve as a critical diagnostic indicator for scientific assessment of conditions such as VB12 deficiency, neurological syndromes, and pernicious anemia. Thus, the accurate detection of Co2+ and VB12 is of great significance for addressing these public health concerns. In this study, a novel method was developed to detect Co2+ and VB12, based on the Co2+-enhanced chemiluminescence of boron-nitrogen co-doped carbon dots (BN-CDs). It achieved a competitive limit of detection of 1.63 nM for Co2+ and 0.016 nM for VB12 based on a signal-to-noise ratio (S/N) of 3. This method also exhibited excellent selectivity, along with the advantages of simple operation, high sensitivity, and rapid response. Additionally, a smartphone-integrated portable sensor was proposed to enable the portable analysis of Co2+. To the best of our knowledge, this is the first report of a chemiluminescent sensor that sculpts from BN-CDs for the simultaneous detection of Co2+ and VB12.