Introduction:The similarity between ankylosing spondylitis (AS) and ulcerative colitis (UC) in incidence rate and pathogenesis has been revealed. But the common pathogenesis that explains the relationship between AS and UC is still lacked, and the related genetic research is limited. We purposed to explore shared biomarkers and pathways of AS and UC through integrated bioinformatics.Methods:Gene expression data of AS and UC were obtained in the GEO database. We applied weighted gene co-expression network analysis (WGCNA) to identify AS-related and UC-related co-expression gene modules. Subsequently, machine learning algorithm was used to further screen hub genes. We validated the expression level and diagnostic efficiency of the shared diagnostic gene of AS and UC in external datasets. Gene set enrichment analysis (GSEA) was applied to analyze pathway-level changes between disease group and normal group. Finally, we analyzed the relationship between hub biomarker and immune microenvironment by using the CIBERSORT deconvolution algorithm.Results:203 genes were obtained by overlapping AS-related gene module and UC-related gene module. Through SVM-RFE algorithm, 19 hub diagnostic genes were selected for AS in GSE25101 and 6 hub diagnostic genes were selected for UC in GSE94648. KCNJ15 was obtained as a common diagnostic gene of AS and UC. The expression of KCNJ15 was validated in independent datasets, and the results showed that KCNJ15 were similarly upregulated in AS samples and UC samples. Besides, ROC analysis also revealed that KCNJ15 had good diagnostic efficacy. The GSEA analysis revealed that oxidative phosphorylation pathway was the shared pathway of AS and UC. In addition, CIBERSORT results revealed the correlation between KCNJ15 gene and immune microenvironment in AS and UC.Conclusion:We have explored a common diagnostic gene KCNJ15 and a shared oxidative phosphorylation pathway of AS and UC through integrated bioinformatics, which may provide a potential diagnostic biomarker and novel insight for studying the mechanism of AS-related UC.