Nitrogen-doped carbon dots (NCDs) with bright blue fluorescence were constructed by a hydrothermal method using sucrose and L-proline as raw materials. The NCDs were characterized by transmitted electron microscopy, X-ray diffraction, Fouriertransform infrared spectrometry, X-ray photoelectron spectroscopy, and ultravioletvisible absorption and fluorescence spectroscopy to investigate the morphology, elemental composition, and optical properties. The NCDs had good water solubility, high dispersibility with an average diameter of only 1.7 nm, and satisfactory optical properties with a fluorescence quantum yield of 23.4%. The NCDs were employed for the detection of bilirubin. A good linear response of the NCDs in the range 0.35-9.78 μM was obtained for bilirubin with a detection limit of 33 nM. The NCDs were also applied to the analysis of real samples, serum and urine, with a recovery of 95.34% to 104.66%. The low cytotoxicity and good biocompatibility of the NCDs were indicated by an MTT assay and cell imaging of HeLa cells. Compared with other detection systems, using NCDs for bilirubin detection was a facile and efficient method with good selectivity and sensitivity.