Metformin is currently the most prescribed oral agent for diabetes treatment; however the overdose or long-term use may cause some severe side effects such as liver injury. Researches indicate that metformin-induced liver injury is closely related to upregulation of hepatic H2S. Hence, monitoring hepatic H2S generation induced by metformin could be an effective approach for evaluating hepatoxicity of the drug. Methods: We present a novel turn-on and dual-mode probe for detecting and imaging metformin-induced liver injury by specifically tracking the upregulation of hepatic H2S with fluorescent and optoacoustic methods. After reaction with H2S, the strong electron-withdrawing group dinitrophenyl ether (which acts as both the recognition moiety and the fluorescence quencher) was cleaved and replaced by an electron-donating group hydroxyl. This correspondingly leads to the changes of the probe’s electronic state and absorption red-shifting as well as the subsequent turn-on fluorescent and optoacoustic signals. Results: The probe was applied to the colon tumor-bearing mice model and the metformin-induced liver injury mice model to achieve tumor imaging and liver injury assessment. The biosafety of the probe was verified by histological analysis (hematoxylin and eosin staining) and serum biochemical assays. Conclusion: The probe responds quickly to H2S in tumors and the liver, and MSOT imaging with the probe offers cross-secitonal and 3D spatial information of liver injury. This study may provide an effective approach for accessing medication side effects by tracking drug-metabolism-related products.