Hepatocellular carcinoma (HCC) is one of the most common cancers in the world and is often associated with a poor prognosis. The main reason for this poor prognosis is that inconspicuous early symptoms lead to delayed diagnosis. Treatment options for advanced HCC remain limited and ineffective. In this context, the exploration of the immune microenvironment in HCC becomes attractive. In this study, we divided HCC into immune cell and non-immune cell subtypes, by single-cell sequencing analysis of GEO dataset GSE146115. We found differentially expressed genes in the two subtypes, which we used to construct a prognostic model for HCC through Cox and Lasso regressions. Our prognostic model can accurately evaluate the prognosis of HCC patients, and provide a reference for the design of immunotherapy for HCC.