The detection mechanism of fluorescent probe FQ-DNP (DNP: 2,4-dinitropheno) for PhSH and the detailed ESIPT process of its product 2-(6-(diethylamino) quinolin-2-yl)-3-Hydroxy-4H-chromen-4-one (FQ-OH) have been revealed by density functional theory (DFT) and time-dependent density functional theory (TD-DFT). For FQ-OH, the decreased bond length of H 6 -N 7 and RDG analysis illustrate that the strength of hydrogen bond H 6 -N 7 has been enlarged after photoexcitation, creating a good condition for ESIPT. To illustrate the ESIPT process in detail, the potential energy curves are performed and the transition state reaction energy is calculated. In the S 0 state, the FQ-OH could happen proton transfer (PT) to form keto, but the keto form is more unstable than enol form. After photoexcitation, in the S 1 state, FQ-OH could happen PT to produce stable keto form. Excited dynamic simulation shows that PT happens at 71.5 fs. The calculated absorption and emission spectra are in agreement with the experimental data, and the calculated Stokes shift is 160 nm. Frontier molecular orbitals (FMOs) and hole-electron analysis show that twisted intramolecular charge transfer (TICT) is responsible for the fluorescent quenching of FQ-DNP.