As one of many important substances within the conventional Chinese language drugs Gastrodia elata, p-hydroxybenzaldehyde (PHBA) has many pharmacological results. Subsequently, the monitoring of PHBA degree is of nice significance to precise valuation of the pharmacokinetics and poisonous impact of PHBA in physique fluids. So as to obtain the delicate detection of PHBA, nitrogen-doped carbon dots (NCDs) have been designed. NCDs have been efficiently ready via a hydrothermal technique with chrysanthemum because the precursor. The transmission electron microscopy, Fourier remodel infrared spectroscopy, X-ray photoelectron spectroscopy and X-ray diffraction sample have been used for the characterization of NCDs. The as-prepared NCDs confirmed shiny fluorescence with excitation/emission maxima of 290/421 nm and exhibited a fluorescence quenching response to PHBA below the optimum circumstances. An excellent linear response was constructed on the PHBA focus, ranging 10.0–150.0 μM with a detection restrict of 63 nM based mostly on the mechanisms of static quenching and inside filter impact. The proposed probe has been efficiently utilized to the detection of PHBA in blood and urine samples. As well as, the as-prepared NCDs with good biocompatibility have been utilized for cell imaging. These outcomes instructed that NCDs have been promising probes for biosensing and bioimaging.