A nanoprobe for detecting hepatic ischemia-reperfusion injury has been developed. Apparent optoacoustic and NIR-II fluorescent signals are given out upon the nanoprobe’s response to the in situ biomarker H2O2 in the liver in the case of ischemia-reperfusion injury.