This work was aimed at investigating the predictive value on prognosis, response to immunotherapy, and association with the immune landscape of costimulatory molecules in HCC patients. We acquired the clinicopathological information and gene expression of HCC patients from public available database (TCGA and GEO). The prognostic model in TCGA database was established with LASSO regression and Cox regression analysis. Through the Kyoto Encyclopedia of Genes and Genomes (KEGG) and Gene Ontology (GO) analysis, the enrichment analysis was implemented for analyzing the biological function and associated pathways. Immune microenvironment, immune escape, immune therapy, and tumor mutation were analyzed between both risk groups. TNFRSF4, the critical costimulatory molecule, was chosen for the in-depth investigation in vitro experiments. A novel risk signature based on 8 costimulatory molecules associated with prognosis was constructed from TCGA and proved in the database of GEO. The ROC and Kaplan-Meier curves confirmed that this risk model has good predictive accuracy. Our functional analysis demonstrated costimulatory molecular genes might associate with immune-related functions and pathways. Statistical differences were not shown between both groups, in the aspect of immune landscape, response to immune therapy, and tumor mutation. Knocking down TNFRSF4 expression significantly reduced the proliferation ability and increased the apoptosis ability. On the basis of the costimulatory molecule expression in HCC, a novel risk model was constructed and had an excellent value to predict prognosis, immune microenvironment, and response to immune therapy. TNFRSF4 was identified as an underlying oncogene in HCC and deserves further exploration.