This retrospective study evaluated the electronic medical records of patients with ankylosing spondylitis (AS) (January 2001–December 2018) to determine the relationship between serum alkaline phosphatase (ALP) levels and radiographic changes over time. Longitudinal data, including serum ALP levels, were imputed by linear interpolation at 3-month intervals. Among the serum ALP levels calculated for 8 years prior to modified Stoke Ankylosing Spondylitis Spinal Score (mSASSS) measurement, those having the highest beta coefficient with the mSASSS were selected in the correlation between ALP and longitudinal mSASSS. Linear mixed models with the selected serum ALP levels, mSASSS, and clinical variables were investigated. We included 1122 patients (mean follow-up, 8.20 [standard deviation: 2.85] years). The serum ALP level from 5 years and 3 months prior showed the highest beta coefficient with the mSASSS. In the linear mixed model, the serum ALP level at 5 years and 3 months before radiographic changes was significantly associated with the mSASSS (β = 0.021, 95% confidence interval: 0.017–0.025,p< 0.001). Serum ALP levels measured approximately 5 years before may be a surrogate marker for predicting spinal radiographic changes. Long-term prospective clinical and experimental studies of > 5 years are required for biomarker discovery or therapeutic research on AS radiographic progression.