Lenvatinib has been approved as one of the first-line treatments for advanced hepatocellular carcinoma (HCC) due to its high treatment efficacy being non-inferior to sorafenib. Previous studies have shown well-controlled viremia contributes to the prognosis of HCC patients receiving first-line sorafenib; hence, we postulated this association might also exist in HCC patients with lenvatinib treatment. From April 2018 to December 2021, 201 unresectable HCC patients with first-line lenvatinib treatment in our institute were assessed. High-effect nucleoside analogues were administered for hepatitis B virus (HBV) control, while direct-acting antivirals were used for hepatitis C virus (HCV) elimination. Based on our previous study, well-controlled viremia was defined as patients who had undetectable viremia, or who had been receiving antivirals at least 6 months before lenvatinib. This study enrolled 129 patients, including 85 patients with HBV-related HCC (HBV-HCC) and 44 patients with HCV-related HCC (HCV-HCC), respectively. Progression-free survival (PFS) and overall survival (OS) rates between the two groups were not different. Before administration of lenvatinib, 57.1% of the HBV-HCC patients and 88.4% of the HCV-HCC patients had well-controlled viremia, and their PFS (8.8 vs. 3.1 months, p < 0.001) and OS (30.2 vs. 12.8 months, p = 0.041) were better than those who had uncontrolled viremia; moreover, well-controlled viremia reduced tumor progression in multivariate analysis (Hazard ratio: 0.41, 95% confidence interval: 0.25-0.68, p = 0.001) after adjusting for albumin-bilirubin grade and concurrent treatment. HBV or HCV infection was not associated with tumor progression of HCC patients receiving lenvatinib, but viremia, controlled or not, was.