The excited (S1) state charge distribution characteristics and fluorescence mechanism of fluorescence probes benzyl (6-cyano-2-naphthoyl)-L-valinate (NPI) and benzyl (6-amino-2-naphthoyl)-L-valinate (NPA) have been discussed using density functional theory (DFT) and time-dependent density functional theory (TD-DFT). Further analysis by constructing a torsional potential energy curve (PEC) shows that a well-defined minimum energy conformation is observed when the C-C single bond between the valine benzyl ester and naphthalene ring in NPI rotates. For NPA, the most stable conformation is the naphthalene ring conformation with dihedral angle N2C1C2C3 of -30.60°, whose total energy is 0.17 kcal/mol lower than that of the second most stable conformer. The frontier molecular orbitals (FMOs) demonstrate that NPI exhibits a low degree of charge coupling, and the oscillator intensity is close to zero, indicating that it is not conducive to luminescence. However, in the S1 state, the oscillator strength of NPA is 1.2044, which is a bright state, resulting in the strong emitting. Additionally, fluorescence imaging is favored as a visual observation technique, and Stokes shift is an important physical parameter to measure fluorescence. According to the idea that changing the number and position of functional groups can affect the photophysical properties of fluorescent dyes, o-NPDI, p-NPDI and m-NPDI dyes were newly designed and o-NPDA, p-NPDA, m-NPDA produced after recognition of Hg2+. The spectral performance results show that the newly designed fluorescent dye (p-NPDA) can not only emit in the near infrared region after recognizing Hg2+, but also has a large Stokes shift (236 nm). This indirectly reflects that para-substitution is more conducive to Stokes shift, and has become one of the strategies for fluorescent dye design.