BackgroundSp1, a transcription factor, regulates essential cellular processes and plays important tumorigenic roles across diverse cancers. However, comprehensive pan-cancer analyses of its expression and potential immunomodulatory roles remain unexplored.MethodsUtilizing bioinformatics tools and public datasets, we examined the expression of Sp1 across normal tissues, tumors, and immune cells, and screened for pre- and post-transcriptional modifications, including genetic alterations, DNA methylation, and protein phosphorylation, affecting its expression or function. The association of Sp1 expression with immune cell infiltration, tumor mutational burden, and immune checkpoint signaling was also investigated. Single-cell transcriptome data was used to assess Sp1 expression in immune cells in gastric cancer (GC), and findings were corroborated using immunohistochemistry and multiplex immunofluorescence in an immunotherapy-treated patient cohort. The prognostic value of Sp1 in GC patients receiving immunotherapy was evaluated with Cox regression models.ResultsElevated Sp1 levels were observed in various cancers compared to normal tissues, with notable prominence in GC. High Sp1 expression correlated with advanced stage, poor prognosis, elevated tumor mutational burden (TMB), and microsatellite instability (MSI) status, particularly in GC. Significant correlations between Sp1 levels and CD8+ T cell and the M1 phenotype of tumor-associated macrophages were further detected upon multiplex immunofluorescence in GC samples. Interestingly, we verified that GC patients with higher Sp1 levels exhibited improved response to immunotherapy. Moreover, Sp1 emerged as a prognostic and predictive biomarker for GC patients undergoing immunotherapy.ConclusionsOur pan-cancer analysis sheds light on the multifaceted role of Sp1 in tumorigenesis and underscores its potential as a prognostic and predictive biomarker for patients with GC undergoing immunotherapy.