Hepatocellular carcinoma (HCC) is a frequent malignancy that has a high death rate and a high rate of recurrence following surgery, owing to insufficient surgical resection. Furthermore, HCC is prone to peritoneal metastasis (HCC-PM), resulting in a significant number of tiny cancer lesions, making surgical removal more challenging. As a potential imaging target, FGFR4 is highly expressed in tumors, especially in HCC, but is less expressed in the normal liver. In this study, we used computational simulation approaches to develop peptide I0 derived from FGF19, a particular ligand of FGFR4, and labeled it with the NIRF dye, MPA, for HCC detection. In surgical navigation, the TBR was 9.31 ± 1.36 and 8.57 ± 1.15 in HepG2 in situ tumor and HCC-PM models, respectively, indicating considerable tumor uptake. As a result, peptide I0 is an excellent clinical diagnostic reagent for HCC, as well as a tool for surgically resecting HCC peritoneal metastases.