Background. Ankylosing spondylitis (AS) and inflammatory bowel disease (IBD) are both autoimmune diseases, and they often occur together in clinical practice, but the pathogenesis is unclear. This study is aimed at identifying the hub genes and explore the related immune molecular mechanisms between AS and IBD by bioinformatics analysis. Methods. From the public Gene Expression Omnibus (GEO) database, the AS and IBD datasets (GSE73754, GSE59071, GSE25101, and GSE36807) were obtained. The immune cell infiltration in the peripheral blood tissues of GSE73754 and GSE59071 was assessed using the CIBERSORT algorithm. Then, we used the Weighted Gene Coexpression Network Analysis (WGCNA) to identify the Differentially Expressed Genes (DEGs) related to AS and IBD. Then, the immune genes from the ImmPort database intersected with the DEGs to obtain hub genes. The Gene Ontology (GO) and Kyoto Encyclopedia of Genes and Genomes (KEGG) analyzed the functional correlation of hub genes. Then, hub genes were verified in GSE25101 and GSE36807. The clusterProfiler software and Gene Set Enrichment Analysis (GSEA) were used to conduct functional enrichment and pathway enrichment studies. Finally, the diagnostic efficacy was assessed using Receiver Operating Characteristic (ROC) curve analysis. Results. The analysis of immune characteristics showed that both AS and IBD were related to immunity, and neutrophils were positively correlated in both diseases. Nine coexpressed genes, including FCGRT, S100A11, IFNGR1, NFKBIZ, JAK2, LYN, PLAUR, ADM, and IL1RN, were linked to immune cells. The GO and KEGG analyses results showed that enrichment analysis was mainly related to cell transport and migration. Finally, the ROC curve was verified with the validation set, and it was found that PLAUR has clinical diagnostic significance and the most excellent specificity and sensitivity, respectively. Conclusions. PLAUR (uPAR) is a promising biomarker and will be an underlying genetic biomarker for diagnosing AS comorbid IBD. Inflammation and immunological modulation mediated by neutrophil infiltration were important in the development of AS and IBD and may be diagnostic and therapeutic targets.