Hydrogen sulfide (H2S) has multiple contributions to living organisms and is also linked to the freshness of most high-protein foodstuffs. Therefore, developing a highly sensitive technology for on-site detection of H2S is promising and crucial. In this paper, a novel ratiometric near-infrared fluorescent probe 1,1,3-trimethyl-2-(4-(5,5,7-trimethyl-4,5,6,7-tetrahydro-3H-4,6-methanobenzo[d]imidazol-2-yl)styryl)− 1H-benzo[e]indol-3-ium iodide (TIBI) was designed and synthesized from α-pinene derivative 4,6,6-trimethylbicyclo[3.1.1]heptane-2,3-dione for the specific detection of H2S. TIBI displayed several excellent merits during the detection of H2S including low detection limit (19.43 nM), short response time (50 s), and wide pH detection range (59). The emission wavelength of TIBI blue-shifted from 690 nm to 460 nm accompanying with the fluorescence color changed from red to blue at the presence of H2S, and its fluorescence intensity ratio (I460 nm/I690 nm) enhanced up by 540 folds. The TIBI-loaded test strips could successfully achieved the real-time and convenient monitoring of H2S produced from food spoilage. Besides, probe TIBI could be also applied for imaging H2S level in living cells and zebrafish.