We report an electrochemiluminescence (ECL) sensor based on nitrogen doped carbon quantum dots (N-CQDs), which has been synthesized by a solvothermal method. The N-CQDs were characterized using various techniques such as high-resolution transmission electron microscopy, field emission scanning electron microscopy, UV-Vis absorption and photoluminescence spectroscopy, Fourier transform infrared spectroscopy, X-ray photoelectron spectroscopy, and X-ray diffraction. The potential sweep range (−0.5 to −2.2 V) shows a stable and strong ECL signal. Interestingly, the ECL intensity only decreased by less than 20% after storing at 4°C for 10 months. The applicability of the N-CQD sensor in electroanalytical chemistry was identified by the linear ECL on–off response for ceftazidime in a concentration range from 1×10-7 to 5×10-4 mol L–1 and a detection limit of 2.3×10-8 mol L–1. The results suggest that the proposed ECL sensor is robustly applicable for analysis of ceftazidime in real samples such as human serum, bovine milk, and commercial milk powder.