Nitrite is a widely used food additive that has been shown to be carcinogenic and can cause health damage when consumed in excess. Therefore, developing a detection method is in demand. Here, we prepared a novel Fe-doped carbon dots (Fe-CDs) using metallic deep eutectic solvent (MDES) which showed high sensitivity and selectivity. Besides, it also showed excellent pH-dependent luminescence characteristics, which proved the feasibility as a pH sensor. Under the optimal conditions, the detection linear of nitrite ranged from 0.2 to 80 µM, and the detection limit was 50 nM. The recovery rate was between 98.8 % and 104.1 % in food and water samples. For pH monitoring, its fluorescence intensity was linearly correlated in the pH range from 2 to 7, accompanying a unique differential solution color change of colorless-yellow-green. Therefore, it can be used as an excellent fluorescent probe for detection of nitrite and pH in food and water environment.