To study the effect of long snake moxibustion intervention on gut microbiota of patients with ankylosing spondylitis (AS) by 16S rDNA sequencing technology. 30 AS patients and 30 healthy volunteers were recruited and treated with long snake moxibustion once a week for 12 weeks. AS patients were divided into pre-treatment and post-treatment groups. VAS, BASDAI and BASFI scores of AS patients before and after treatment were collected. 16S rDNA high-throughput sequencing technology was used to analyze the characteristics and differences of gut microbiota in AS patients before and after treatment and in healthy volunteers. VAS, BASDAI and BASFI scores of AS patients after long snake moxibustion treatment were lower than those of pre-treatment group (P<0.05). The results of gut microbiota Alpha diversity showed that ace and chao1 index of the post-treatment group were higher than those of the healthy group (P<0.05), but there was no statistical significance in ace and chao1 index between the pre-treatment group and the post-treatment group (P>0.05). Beta diversity analysis showed that mild classification aggregation occurred between the healthy group and the pre-treatment group , but did not reach a significant level, and there was no significant difference between the the pre-treatment group and the post-treatment group. The results of species abundance showed that, at the phylum level, compared with the healthy group, the relative abundance of Firmicutes and Proteobacteria decreased in the pre-treatment group, while the relative abundance of Bacteroidetes and Actinobacteria increased. Compared with the pre-treatment group, the relative abundance of Firmicutes increased and the relative abundance of Actinobacteria decreased in the post-treatment group, but there were no statistically significant differences in the above changes (P>0.05). At the genus level, compared with the healthy group, the relative abundances of Subdoligranulum in the pre-treatment group were increased (P<0.05), while the relative abundances of Bifidobacterium and Streptococcus were decreased (P<0.05). Compared with the pre-treatment group, the relative abundance of Romboutsia in the post-treatment group was increased (P<0.05). Long snake moxibustion can obviously improve the clinical symptoms of AS patients. The possible mechanism of action is related to regulating the abundance of gut microbiota, increasing beneficial bacteria and restoring the homeostasis of gut microorganisms.