Drug-induced liver injury (DILI) has emerged as a significant health risk, yet reliable methods of detection at an early stage are in urgent need. Recent researches have highlighted the crucial role of hydrogen sulfide (H2S) in various pathological and physiological processes, with a correlation between its levels and the severity of DILI. We developed a novel fluorescent probe H2S-YL for the precise detection of liver H2S fluctuations in DILI, and the liver in situ accumulation capacity of H2S-YL has been significantly enhanced by incorporating a liver-targeting cholic acid moiety into its skeleton. Furthermore, H2S-YL displays exceptional selectivity, good sensitivity and responds rapidly toward H2S within 3 min, thereby enabling precise detection of subtle hepatic H2S fluctuations capability essential for accurately assessing the severity of DILI. Subsequently, H2S-YL was employed to assess the hepatoprotective effects of natural constituents derived from traditional Chinese medicine, via monitoring H2S levels both in cells and in vivo. These results demonstrate that H2S-YL serves as a powerful tool for visualizing pathological hepatic H2S fluctuations, thereby enabling the assessment of DILI severity and the efficacy of hepatoprotective natural constituents.