A chalcone-based probe was designed to hydrogen sulfide (H2S) detection by employing 2,4-dinitrophenyl either as a recognition group. This probe can rapidly and specifically detect H2S in semi-aqueous solutions with the detection limit of 120 nM and a wide pH range from 2.0 to 9.0. The sensing mechanism was determined by UV–Vis, fluorescence spectra, mass spectra, 1H NMR studies and density functional theory calculations, respectively. Additionally, the probe can target lysosomes and monitor H2S in living cells and zebrafish by fluorescence imaging.