Perfluorooctanoate (PFOA) and perfluorooctane sulfonate (PFOS), two prominent per- and polyfluoroalkyl substances (PFASs), are potentially harmful to many human organs. However, there only exist limited methods to mitigate their health hazards. The aim of this study is to combine a bioinformatics analysis with in vitro experiments to discover small molecules that can alleviate liver damage caused by PFOA/PFOS. We identified 192 and 82 key genes related to hepatocytes exposed to PFOA and PFOS, respectively. The functional enrichment analysis of key genes suggested cellular senescence may be important in PFOA/PFOS-induced hepatotoxicity. The in vitro models revealed that PFOA/PFOS led to hepatocyte senescence by increasing the activity of SA-β-gal, inducing mitochondrial dysfunction, impacting cell cycle arrest, and elevating the expressions of p21, p53, IL-1β, and SASP-related cytokines. The drug-target gene set enrichment analysis method was employed to compare the transcriptome data from the Gene Expression Omnibus database (GEO), Comparative Toxicogenomics Database (CTD), and the high-throughput experiment- and reference-guided database (HERB), and 21 traditional Chinese medicines (TCMs) were identified that may alleviate PFOA/PFOS-induced liver aging. The experimental results of co-exposure to PFOA/PFOS and TCMs showed that sanguinarine has particular promise in alleviating cellular senescence caused by PFOA/PFOS. Further investigations revealed that the mTOR-p53 signaling pathway was involved in PFOA/PFOS-mediated hepatic senescence and can be blocked using sanguinarine.