A novel metal-doped carbon quantum dot, zinc-chlorine co-doped carbon quantum dots (Zn/Cl-CQDs), has been developed for the fluorescent probe detection of vitamin B2 and the analysis of the correlation properties of this carbon quantum dot and vitamin B2. Stability experiments demonstrate that Zn/Cl-CQDs possess good fluorescence properties under alkaline conditions. However, when vitamin B2 is added into Zn/Cl-CQDs, the fluorescence intensity decreases sharply, indicating that a fluorescence quenching phenomenon occurs between vitamin B2 and Zn/Cl-CQDs. Lastly, the use of Zn/Cl-CQDs in the detection of vitamin B2 tablets and vitamin B2-rich fruits resulted in recovery rates of 98.2% and 100.6%, respectively. Therefore, this method can be well applied to the detection and analysis of vitamin B2, and has great development prospects in the pharmaceutical industry and food monitoring fields.