There were several studies on Transient receptor potential vanilloid 1 (TRPV1), the research on TRPV1 in cancer remains unclear. The expression, prognostic, single-cell value, immune cell infiltration, and immune check-point (ICI) of TRPV1 in pan-cancer were assessed. Functional assays were performed to evaluate the effect of TRPV1 in vitro. TRPV1 was significantly upregulated in 13 cancers, and was closely correlated with poor prognosis. Moreover, the expression of TRPV1 was significantly correlated with the infiltration of immune cells and ICI. Cellular function and western blot experiments revealed that TRPV1 may be required for cancer cell migration in head and neck cancer and lung cancer by inhibition of PI3K/AKT and promotion of immune cell infiltration and autophage. Our study suggests that TRPV1 may be able to regulate the tumor microenvironment by regulating immune-related physiological activities and thereby regulating the occurrence and progression of cancers. Thus, TRPV1 could be used to develop new-targeted drugs for cancers.