Bioinformatics analysis of Gene Expression Omnibus (GEO). Ossification of the ligamentum flavum (OLF) and ankylosing spondylitis (AS) represent intricate conditions marked by the gradual progression of endochondral ossification. This investigation endeavors to unveil common biomarkers associated with heterotopic ossification and explore the potential molecular regulatory mechanisms. Microarray and RNA-sequencing datasets retrieved from the Gene Expression Omnibus (GEO) repository were harnessed to discern differentially expressed genes (DEGs) within the OLF and AS datasets. Subsequently, Weighted Gene Co-expression Network Analysis (WGCNA) was implemented to pinpoint co-expression modules linked to OLF and AS. Common genes were further subjected to an examination of functional pathway enrichment. Moreover, hub intersection genes were identified using the Least Absolute Shrinkage and Selection Operator (LASSO) regression, followed by an evaluation of diagnostic performance in external OLF and AS cohorts. Lastly, an analysis of immune cell infiltration was conducted to scrutinize the correlation of immune cell presence with shared biomarkers in OLF and AS. A total of 1353 and 91 Differentially Expressed Genes (DEGs) were identified in OLF and AS, respectively. Using the Weighted Gene Co-expression Network Analysis (WGCNA), 2 modules were found to be notably significant for OLF and AS. The integrative bioinformatic analysis revealed 3 hub genes (MAB21L2, MEGF10, ISLR) as shared risk biomarkers, with MAB21L2 being the central focus. Receiver Operating Characteristic (ROC) analysis exhibited a strong diagnostic potential for these hub genes. Gene Ontology (GO) analysis indicated their involvement in the positive regulation of myoblast proliferation. Notably, MAB21L2 was singled out as the optimal common biomarker for OLF and AS. Furthermore, an analysis of immune infiltration demonstrated a correlation between MAB21L2 expression and changes in immune cells. Activated CD8 T cells were identified as shared differential immune infiltrating cells significantly linked to MAB21L2 in both OLF and AS. This study represents the first instance of identifying MAB21L2 as a prospective diagnostic marker for patients contending with OLF associated with AS. The research results indicate that the ECM-receptor interaction and the cell-cell adhesion may play a role in both disease processes. This newfound knowledge not only enhances our understanding of the pathogenesis behind spinal ligament ossification but also uncovers potential targets for therapeutic interventions.