This study aimed to identify susceptibility genes and pathways associated with ankylosing spondylitis (AS) by integrating whole transcriptome-wide association study (TWAS) analysis and mRNA expression profiling data. AS genome-wide association study (GWAS) summary data from the large GWAS database were used. This included data of 1265 AS patients and 452264 controls. A TWAS of AS was conducted using these data. The analysis software used was FUSION, and Epstein-Barr virus–transformed lymphocytes, transformed fibroblasts, peripheral blood, and whole blood were used as gene expression references. Gene ontology (GO) and Kyoto Encyclopedia of Genes and Genomes (KEGG) enrichment analyses were performed for the important genes identified via TWAS. Protein-protein interaction (PPI) network analysis based on the STRING database was also performed to detect genes shared by TWAS and mRNA expression profiles in AS. TWAS identified 920 genes (P <0.05) and analyzed mRNA expression profiles to obtain 1183 differential genes. Following comparison of the TWAS results and mRNA expression characteristics, we obtained 70 overlapping genes and performed GO and KEGG enrichment analyses of these genes to obtain 16 pathways. Via PPI network analysis, we obtained the protein interaction network and performed MCODE analysis to acquire the HUB genes. Similarly, we performed GO and KEGG analyses on the genes identified by TWAS, obtained 98 pathways after screening, and analyzed protein interactions via the PPI network. Through the integration of TWAS and mRNA expression analysis, genes related to AS and GO and KEGG terms were determined, providing new evidence and revealing the pathogenesis of AS. Our AS TWAS work identified novel genes associated with AS, as well as suggested potential tissues and pathways of action for these TWAS AS genes, providing a new direction for research into the pathogenesis of AS.