A comprehensive bioinformatics analysis of genes which may have correlations with ankylosing spondylitis (AS). To study the mechanisms of AS by analyzing microarray of GSE25101. AS is an inflammatory arthritis that can lead to chronic pain and disability. GSE25101 was downloaded from Gene Expression Omnibus including 16 AS patients and 16 normal controls. The differentially expressed genes (DEGs) were screened using limma package in Bioconductor and miRNAs targeted DEGs were predicted. Then, gene ontology and pathway enrichment analysis of DEGs was performed using Database for Annotation, Visualization, and Integrated Discovery. Besides, the interaction relationships of the proteins encoded by DEGs were searched by STRING, and the protein-protein interaction (PPI) network was visualized by Cytoscape. Moreover, modules analysis of PPI network was performed using Clique Percolation Method in CFinder. A total of 284 DEGs were screened and 1899 miRNA-mRNA regulatory pairs were obtained. Both myosin heavy chain 9 (MYH9) and B-cell chronic lymphocytic leukemia/lymphoma 11B (BCL11B) were targeted by has-miR-124 and has-miR-363. Function enrichment analyze indicated that these DEGs, especially, downregulated protein tyrosine phosphatase receptor-type C (PTPRC), cluster of differentiation 3γ (CD3G), cluster of differentiation 247 (CD247), cluster of differentiation 4 (CD4), interleukin 7 receptor (IL7R), MYH9, and BCL11B were associated with regulation of immune response. Meanwhile, CD4 (degree=25), perforin 1 (PRF1) (degree=15), PTPRC (degree=13), and CD247 (degree=9) had higher connectivity degrees in the PPI network for the DEGs. And they might be involved in AS by interacting with other genes in module B (eg, PTPRC-IL7R, CD3G-CD247, and PRF1-PTPRC). MYH9, BCL11B, PTPRC, CD3G, CD247, CD4, IL7R, and PRF1 might have a correlation with AS.