A hydrothermal strategy for preparing boron and nitrogen codoped carbon quantum dots was studied using the precursors of p-amino salicylic acid, boric acid and ethylene glycol dimethacrylate. The boron and nitrogen codoped carbon quantum dots have high fluorescence intensity, good monodispersity, high stability, superior water solubility, and a fluorescence quantum yield of 19.6%. Their average size is 5 nm. Their maximum excitation and emission wavelengths are 380 and 520 nm, respectively. Permanganate (MnO4-) quenched boron and nitrogen codoped carbon quantum dots fluorescence through inner filter effect and static quenching effects. The linear relation between quenching efficiency and MnO4- concentration ranged from 0.05 to 60 μmol/L with a detection limit of 13 nmol/L. In the presence of captopril, MnO4- was reduced to Mn2+ and the fluorescence of boron and nitrogen codoped carbon quantum dots was recovered. The linear range between recovery and captopril concentration was from 0.1 to 60 μmol/L. The limit of detection was 0.03 μmol/L. The developed method can be employed as a sensitive fluorescence sensing platform for MnO4-. It has been successfully used for captopril detection in mouse plasma.