As a metal, copper plays an important role in biological systems. However, excessive intake can lead to toxicity and disease. Therefore, there is a need to establish accurate and sensitive methods to detect and monitor copper levels in food and the environment. Herein, nitrogen-silicon co-doped carbon dots (N,Si-CDs) were synthesized using lemon peel as the biomass precursor by one-step hydrothermal synthesis with the addition of citric acid solution and 3-aminopropyl triethoxysilane (APTES). The prepared N,Si-CDs showed excellent photobleaching resistance, brilliant fluorescence performance and good selectivity. The experiments showed that the fluorescence of N,Si-CDs decreased after the interaction of N,Si-CDs with copper ions. Further studies showed that the decrease in fluorescence intensity of the fluorescent probe due to Cu2+ was dynamic quenching. In addition, the fluorescence intensity of N,Si-CDs showed a good linear relationship with the concentration of copper ions. The linear range was 0.5 μM–250 μM, the R2 was 0.995, and the limit of detection was 0.43 μM. Finally, the method has been successfully applied to the detection of copper ions in the water environment and food, and the recoveries of 99.4%–102.1 % were obtained, which indicated that the method had a promising future.