Growing evidence has shown that exercise can affect the gut microbiota. The effects of exercise frequency on the gut microbiota in elderly individuals are still largely unknown. In the present study, samples from 897 elderly and 1,589 adult individuals (18–60 years old) from the American Gut Project were screened. Microbial diversity and composition were analyzed by QIIME2, and microbial function was predicted by PICRUSt2. The outcomes were further analyzed by STAMP. The analysis showed that the α‐diversity of gut microbiota increased with increasing age, and regular exercise reshaped the alterations in microbial composition and function induced by aging. Moreover, the α‐diversity of gut microbiota was higher in overweight elderly individuals than in normoweight elderly individuals, and regular exercise significantly affected the microbial composition and function in overweight elderly individuals. In conclusion, we revealed that regular exercise benefits elderly individuals, especially overweight elderly individuals, by modulating the gut microbiota.