A fluorescence probe has been synthesized for the detection of osthole using the nitrogen-doped carbon dots (NCDs) as shown in Fig. 1. The NCDs were fully characterized by transmission electron microscopy (TEM), X-ray diffraction (XRD), x-ray photoelectron spectroscopy (XPS), Fourier transform infrared spectroscopy (FTIR). Under the optimal experimental conditions, the NCDs fluorescence probe was highly selective and sensitive to osthole. The linear response range for osthole was 5.0–7 5μM with a detection limit of 38 nM. The mechanism of the interaction of osthole and NCDs was discussed. The fluorescence probe has been applied to the analysis of biological samples. The as-synthesized NCDs with high fluorescence intensity, low toxicity and good biocompatibility were applied to cell imaging.