Primary Sjögren's syndrome (pSS) is an inflammatory systemic autoimmune disease, while the role and mechanisms of pyroptosis in pSS remain largely undefined. Pyroptosis-related genes and gene expression data were obtained from the Molecular Signatures Database and NCBI GEO databases. Differentially expressed genes (DEGs) and pyroptosis-related hub genes were identified by R software. Functional enrichment analyses were conducted using the "ClusterProfiler" R package and WebGestalt7. CIBERSORTx was used to calculate the correlations between immune cells and pyroptosis. Subsequently, histological staining was performed on salivary gland samples from non-pSS and pSS patients to identify the expression of pyroptosis-related genes. Immunofluorescence double staining was conducted to validate the correlation between immune cells and pyroptosis. A total of 1494 DEGs were identified between eight pSS samples and 10 healthy volunteer samples. Five pyroptosis-related hub genes (AIM2, CASP1, CASP3, IL6, TNF) were recognised. DEGs were mostly enriched in immunity-related terms and several immune cells were associated with the hub genes in pSS. Among them, delta gamma T cell was significantly positively correlated with CASP3. Finally, the protein levels of these hub genes were validated to be elevated in the labial minor salivary gland biopsies of pSS patients compared to those of healthy volunteers using immunohistochemical staining. Immunofluorescence double staining further showed that IL-6, AIM2, CASP1and CASP3 were related to delta gamma T cells, and TNF was related to dendritic cells. This study uncovered a significant interaction between pyroptosis and the immune microenvironment in pSS patients. Besides, we identified five pyroptosis-related hub genes that might play a role in the pathogenesis of pSS. These findings could offer valuable insights for the development of novel treatment strategies for pSS.