A ratiometric fluorescent probe containing a comarin-pyrazoline fluorophore and a 2,4-dinitrobenzenesulfonyl (DNBS) group for thiols has been developed. The probe can fast recognize thiols under both one-photon and two-photon excitations in PBS solution with low detection limits (one-photon 10−8 M and two-photon 10−7 M). The sensing mechanism was confirmed by using ESI-MS and fluorescent spectra. Moreover, the probe was successfully used for the fluorescent imaging of living cells and calf serum.