Oncolytic viral immunotherapy is a cancer treatment that uses native or genetically modified viruses that selectively replicate and destroy tumor cells. In this study, we aimed to construct a virus-based prognostic model for risk assessment and prognosis prediction in patients with hepatocellular carcinoma (HCC) and determine the most appropriate virus as a candidate vector for oncolytic virus immunotherapy. Microbiome and RNA sequencing data and clinical information were obtained from The Cancer Genome Atlas, and viruses with prognostic value were identified (Deltabaculovirus, Sicinivirus, and Cytomegalovirus) to construct the prognostic model. Correlation analyses were performed to evaluate the predictive function of the viral signature. Bioinformatics analyses were conducted to explore the functional enrichment of viral expression in HCC. The risk score generated by this model could distinguish patients with different survival outcomes, have excellent reliability and accuracy, and could be used as an independent prognostic indicator. The high-risk score group showed significantly lower overall survival, and this trend was also observed in subgroups with different clinicopathological features. Furthermore, Deltabaculovirus positively correlated with amino acid metabolism, energy metabolism signaling pathways, peroxisomes, and complement coagulation cascades. In addition, Deltabaculovirus was significantly related to immune cell infiltration; therefore, patients with high Delta-baculovirus expression might respond better to HCC immunotherapy. Our study identified a promising predictive viral signature for assessing clinical prognosis and guiding immunotherapy in HCC. Deltabaculovirus might be a suitable viral vector for oncolytic virus immunotherapy.