Background: The prognosis of hepatocellular carcinoma (HCC) is closely related to immunity and inflammation, but the value of using immune and inflammation-related genes as predicting the prognosis of HCC requires further research.Methods: The Hepatocellular Carcinomar mRNA data was downloaded in the TCGA and ICGC database. The R package "limma" was used to analyze the differential expression of genes (DEGs) irelated to immune and inflammatory .Univariate Cox analysis screen for immune and inflammation related genes with prognostic value, then construction and verification of the prognostic model in Hepatocellular Carcinomar. The correlation between risk score with tumor immune immersion and immune cell function was assessed through tumor microensure and immune response analysis. NCI-60 cell line to explore the relationship between prognostic gene expression and drug sensitivity.Results: We evaluated 8 immune and inflammatory-related genes to build a prognostic risk prediction model, riskscore is an independent risk factor affecting prognosis, closely related to histological grading and clinical staging. The immune of adCs, macrophages, Tfh cells, Treg cells and Th1 cells higher in the tumor microenvironment leads to poor prognosis of liver cancer. Using data from the NCI-60 cell line, DNASE1L3 high expression may increased resistance of liver cancer cells to bovine platinum, solafinil and bovine platinum. The expression of SLC7A11 can increase the sensitivity of liver cancer to arsenic trioxide (ATO). Simultaneously constructing models and tumor microenvironment and drug resistance may provide effective and safe strategies for HCC chemotherapy and immunotherapy.Conclusion:Our study screened eight immune and inflammation-related genes play an important role in HCC tumor immunity and can be used to predict the prognosis of HCC.