Ankylosing spondylitis (AS) is a chronic inflammatory disease primarily affecting the sacroiliac joints and the spine, for which the pathogenesis is thought to be a result of the combination of host genetic factors and environmental triggers. However, the precise factors that determine one’s susceptibility to AS remain to be unraveled. With 100 trillion bacteria residing in the mammalian gut having established a symbiotic relation with their host influencing many aspects of host metabolism, physiology, and immunity, a growing body of evidence suggests that intestinal microbiota may play an important role in AS. Several mechanisms have been suggested to explain the potential role of the microbiome in the etiology of AS, such as alterations of intestinal permeability, stimulation of immune responses, and molecular mimicry. In this review, the existing evidence for the involvement of the microbiome in AS pathogenesis was discussed and the potential of intestinal microbiome-targeting strategies in the prevention and treatment of AS was evaluated.