Nickel ion (Ni2+) and pH play an important role in environment and living organisms. A fluorescent probe “naphthalimide- s-triazine” (NCNS) for targeted dual detection of Ni2+ and pH was synthesized. As a result, NCNS exhibits excellent optical properties: a much larger Stokes shift (140 nm), eminent changes of fluorescence intensity and significant red-shift both for Ni2+ and pH. As for the detection of Ni2+, the selectivity is high and the anti-interference is strong. NCNS can fluorescently detect Ni2+ in a wider pH range from 4.0 to 10.5. It provides a much lower limit of detection (LOD, 20.03 nM), a rapid response time (150 s) and six times reversibility, showing the high sensitivity. Particularly, NCNS can be applied to fluorescently detect Ni2+ in actual water samples and HA-VSMC imaging. In the detection of pH, the probe generates a ratiometric fluorescence in a wide pH range (3.0 ∼ 12.3). NCNS has been successfully made test paper both for Ni2+ and pH. The mechanisms of the double recognition are verified by the density functional theory (DFT) calculations and the nuclear magnetic resonance (NMR) titration experiments.