Hepatocellular carcinoma (HCC) is the most common primary malignant tumor of the liver. Tumor-infiltrating lymphocytes (TILs) are a class of cells that form the tumor microenvironment and thus have an effect on carcinogenesis. The aim of this study was to investigate the immunohistochemical expression of CD8, CD4, cytotoxic T lymphocyte-associated protein-4 (CTLA-4), and granzyme B in HCC and their correlation with clinicopathologic parameters and prognosis. This study was carried out on 112 cases of HCC. High percentage of CD8(+) TILs was associated with large tumors and adjacent noncirrhotic liver. High percentage of CD4(+) TILs and high CD4 to CD8 ratio were associated with nonviral etiology, low alpha fetoprotein, and direct acting antiviral treatment. High percentage of CTLA-4-positive TILs tended to be associated with high-grade HCC, while a high percentage of CTLA-4 in tumor cells was associated with multiple lesions and low tumor grade. High percentage of granzyme B+ TILs was associated with low grade, early stage, and absence of tumor recurrence. High CD4 percentage and high CD4/CD8 ratio affected patients' overall survival. There is a dynamic interaction between the different subsets of lymphocytes in the environment of HCC manifested by coparallel expression of CD4 and CD8 augmenting the expression of CTLA-4, and only CD8 augments the expression of granzyme B. This opens the gate for the beneficial role of immunotherapy in the management of HCC, reducing recurrence and improving survival.