Nitrogen and boron doped carbon quantum dots (NB-CQDs) with yellow-green emission were prepared via hydrothermal method using 2-hydroxyphenylboronic acid and ethylenediamine in aqueous solution.The as-prepared NB-CQDs exhibited bright yellow-green emission, excellent stability in aqueous solution with high ionic strength and good biocompatibility. We further explored the applications of NBCQDs for sensing metal ions in aqueous solution. We found that the NB-CQDs could be utilized to sense Cr 2 O 7 2À in aqueous solution due to the Cr 2 O 7
2À-induced fluorescence quenching. In the sensing system, as low as 0.5 mM Cr 2 O 7 2À can be successfully detected and a good linear relationship in the range of 0-250 mM has been obtained. And the NB-CQDs can be also used as ink for writing on paper, revealing the NB-CQDs can be applied for anti-counterfeiting. Moreover, the NB-CQDs exhibit negligible cytotoxicity and good biocompatibility, which is favorable for bioimaging applications. And the NB-CQDs were successfully applied for fluorescence imaging in HeLa cells.