Objectives To assess the longitudinal association between physical activity and global functioning in patients with axial spondyloarthritis (axSpA), and to identify the subtype of physical activity that is longitudinally related to global functioning. Method Physical activity was measured using Global Physical Activity Questionnaire. Global functioning was assessed using the Assessment of SpondyloArthritis international Society Health Index (ASAS HI). The amount and subtype (work, transport, and recreation) of physical activity, disease activity, and ASAS HI were assessed at baseline, and at 1 and 2 year follow-up. Physical activity levels were categorized as low, moderate, or high. The longitudinal association between physical activity and ASAS HI scores was analysed using a generalized estimating equation. Results The study evaluated 160 patients. Univariate analysis identified physical activity at moderate level and higher, Ankylosing Spondylitis Disease Activity Score (ASDAS), and syndesmophyte number as being longitudinally associated with ASAS HI over 2 years. Multivariate analysis identified physical activity at moderate level and higher as being longitudinally associated with ASAS HI. Physical activity above moderate levels was associated independently with good global functioning. In the analysis stratified by radiographic axSpA and non-radiographic axSpA, a positive association between physical activity and global functioning was observed in both groups. Only recreational activity, but not work- and transport-related activity, showed an independent longitudinal relationship with the ASAS HI score. Conclusions Physical activity at moderate level and higher was associated independently with global functioning in axSpA. Therefore, patients should maintain physical activity above moderate levels to preserve global function.