Herein, red-emitting nitrogen-doped carbon dots (N-CDs) were prepared using p-phenylenediamine and poly-ethylene glycol 20,000 as precursors. The N-CDs are spherical and uniformly distributed with average particle sizes of 2.36 nm. The N-CDs display excitation-independent fluorescence behavior with the optimal excitation and the maximum emission wavelengths centered at 487 and 628 nm, respectively. Results indicated that as prepared CDs can provide a rapid and highly selective recognition of Cu2+ with the range of 45-70 mu M and a detection (LOD) limit of 45.87 mu M. A clear color change of the N-CDs solution (orange-red to black) can also be visualized by adding Cu2+. Moreover, a smartphone-based platform for the detection of Cu2+ was developed to detect Cu2+ in real time by analyzing RGB values, giving a linear range of 20-140 mu M. and a LOD limit of 35.83 mu M. In addition, it was applied for the detection of Cu2+ in tap water, the recoveries were 86.18 %-104.95 %, and the relative standard deviations were 1.64 %-2.43 %. The N-CDs can be used to detect Cu2+ in vitro and in vivo.