Background and Objectives: The diagnosis and treatment of pituitary adenomas with cavernous sinus invasion pose significant challenges for clinicians. The objective of this study is to investigate the expression profile and prognostic value of HSPB1 (heat shock protein beta-1) in pituitary adenomas with invasive and non-invasive features. Additionally, we aim to explore the potential relationship between HSPB1 expression and immunological functions in pituitary adenoma.Materials and Methods: A total of 159 pituitary adenoma specimens (73 invasive tumours and 86 non-invasive tumours) underwent whole-transcriptome sequencing. Differentially expressed genes and pathways in invasive and non-invasive tumours were analysed. HSPB1 was subjected to adequate bioinformatics analysis using various databases such as TIMER, Xiantao and TISIDB. We investigated the correlation between HSPB1 expression and immune infiltration in cancers and predicted the target drug of HSPB1 using the TISIDB database.Results: HSPB1 expression was upregulated in invasive pituitary adenomas and affected immune cell infiltration. HSPB1 was significantly highly expressed in most tumours compared to normal tissues. High expression of HSPB1 was significantly associated with poorer overall survival. HSPB1 was involved in the regulation of the immune system in most cancers. The drugs DB11638, DB06094 and DB12695 could act as inhibitors of HSPB1.Conclusions: HSPB1 may serve as an important marker for invasive pituitary adenomas and promote tumour progression by modulating the immune system. Inhibitors of HSPB1 expression are currently available, making it a potential target for therapy in invasive pituitary adenoma.