Targeting Protein for Xenopus Kinesin Like Protein 2 (TPX2) serves as a microtubule associated protein for the regulation of spindle assembly and tumorigenesis. We aim to investigate the prognostic and immunological role of TPX2 in pan-cancer. TCGA database, Tumor Immune Single-cell Hub (TISCH), and Human Protein Atlas (HPA) were retrieved to evaluate the expression pattern of TPX2 as well as its diagnostic and prognostic value in solid tumors. Genomic alterations of TPX2 were assessed with cBioPortal database. In vitro experiments in lung adenocarcinoma (LUAD) were performed to confirm the potential role of TPX2. Overexpression of TPX2 was found in 22 types of cancers, and was positively related with copy number variations (CNV) and negative with methylation. Up-regulated TPX2 could predict worse outcomes in the majority of cancers. Single-cell analysis revealed that TPX2 was mainly distributed in malignant cells (especially in glioma) and proliferating T cells. Genomic alteration of TPX2 was common in different types of tumors, while with prognostic value in two types of cancers. Additionally, significant correlations were found between TPX2 expression and tumor microenvironment (including stromal cells and immune cells) as well as immune related genes across cancer types. Drug sensitivity analysis revealed that TPX2 could predict response to chemotherapy and immunotherapy. Functional analyses demonstrated close relationship of TPX2 with immune function and malignant phenotypes. Finally, it was confirmed that knockdown of TPX2 could reduce proliferation and migration ability of LUAD cells. In summary, TPX2 could serve as a diagnostic and prognostic biomarker and a potential immunotherapy marker.