A kind of nitrogen doped carbon dots (NCDs) with excellent stable luminescence performance was prepared by pyrolysis using ethanolamine as precursor. By simply mixing solution of NCDs and calcein-Eu3+, a ratio fluorometric probe with carbon dots as "internal reference" and calcein-Eu3+ as recognition group was constructed for ATP detection. The fluorescence of the calcein can be selectively quenched by Eu3+, and can be restored when ATP was added because Eu3+ ions exhibit higher affinity to the oxygen-donor atoms originated from phosphates than that from carboxylate groups. Meanwhile, fluorescence of NCDs was not affected by Eu3+, calcein or ATP. By adding NCDs as "internal reference" in the above system, a new ratiometric strategy for detecting ATP was conducted. The dynamic linear range for ATP detection was 5.0 × 10−8 mol L−1~ 2.0 × 10−6 mol L−1, and the detection limit was 2.0 × 10−8 mol L−1.The method was successfully applied to detecting ATP in adenosine disodium triphosphate injection. Compared with calcein- Eu3+ probe without NCDs as reference, the ratio fluorometric probe effectively reduced interference and improved the accuracy and sensitivity.