Background: Hepatocellular carcinoma (HCC) is a prevalent liver cancer with poor prognosis, often linked to hepatitis B (HBV) and C (HCV) infections. This meta-analysis evaluates the efficacy of immunotherapy in HCC, particularly in cases arising from viral hepatitis. Methods: In adherence to PRISMA Statement 2020 guidelines, the immunotherapeutic outcomes comprised objective response rate (ORR), progression-free survival (PFS), and overall survival (OS). Data were analyzed from randomized controlled trials up to April 2024 using the fixed-effects models in R (V.4.3.3.) and RevMan (Cochrane). Results: This study included 9 trials with 5316 patients. The ORR was slightly higher in the viral group at 27.93% compared to 24.07% in the non-viral group, though this difference was not significant (p = 0.15). Viral HCC patients exhibited a median PFS of 7.3 months (IQR: 6.2–8.4) compared to 5.8 months (IQR: 5.48–6.13) in non-viral patients, a significant improvement (p = 0.005). Similarly, median OS was longer in the viral group at 16.8 months (IQR: 12.99–20.61) versus 15.2 months (IQR: 13.25–17.15) for non-viral HCC, which was also significant (p < 0.0001). The median OS for viral HCC was 16.8 months (IQR: 14.11–19.49 months), with HBV patients experiencing slightly higher survival at 17.15 months (IQR: 14.3–20 months) compared to 16.8 months (IQR: 12.99–20.61 months) for HCV patients; this difference was not statistically significant (p = 0.89). Conclusions: Immunotherapy shows potential in treating HCC, with significantly better outcomes in viral HCC, particularly HBV-associated cases. The heterogeneity highlights the need for personalized treatment approaches based on the viral background of HCC patients. Further research should aim to optimize these therapies to improve survival rates.