The antitumor effect of TLR7 agonists alone or in combination with immunotherapy was mainly dependent on the increase in the number of infiltrating dendritic cells, M1 macrophages, CD4+ T cells, and CD8+ T cells in the tumor microenvironment, remodeling the tumor microenvironment, and significantly inhibiting tumor growth in colorectal cancer and melanoma-bearing mice, especially in tumor types where immune checkpoint blockers alone were ineffective, and these compounds enhance the antitumor efficacy of PD-1/PD-L1 inhibitors. Here, CD8A is linked to melanoma.