Background: Previous studies revealed that cancer-associated differentially expressed genes (DEGs) in an independent cancer type are rarely related to the tumorigenesis and metastasis, while the common DEGs across multiple types of cancer may be proved as potential oncogenes or tumor suppressors. Although tumor-infiltrating immune cells have been reported to be associated with prognosis in multiple types of cancer, the hub genes regulating immune cells function in different cancer types remain unclear. Methods: To screen for the hub genes regulating immune infiltrating level across multiple tumors microenvironment, the raw data containing RNA sequencing and clinical information from TCGA database and immune scores from ESTIMATE website across 25 cancer types were obtained. Results: Based on the immune scores, all cases were categorized into high-score and low-score groups. Kaplan–Meier survival analysis demonstrated that a strong correlation between immune infiltrating level and survival prognosis was found in six cancer types. The functional enrichment analysis of common DEGs revealed that infection and immune response are the most prominent biological characteristics. Subsequently, the twelve common DEGs with prognostic value were identified as candidate hub genes and were adopted to construct the PPI network. Because of highly interconnected with other hub genes, protein tyrosine phosphatase non-receptor type 6 (PTPN6) was selected as the real hub gene across the six immune-specific tumors. Finally, a significant correlation between PTPN6 and immune inﬁltrating level, and immune marker sets of various immune cells were observed. Conclusion: PTPN6 may play a vital role in regulating immune response for tumor development, due to its significant correlation with tumor-infiltrating immune cells in multiple cancers.