The composition and activity of the gut microbiota depend on the host genome, nutrition, and lifestyle. Exercise and sodium butyrate (NaB) exert metabolic benefits in both mice and humans. However, the underlying mechanisms have not been fully elucidated. This study aimed to examine the effect of exercise training and dietary supplementation of butyrate on the composition of gut microbiota and whether the altered gut microbiota can stimulate differential production of short-chain fatty acids (SCFAs), which promote the expression of SESN2 and CRTC2 to improve metabolic health and protect against obesity. C57BL/6J mice were used to study the effect of exercise and high-fat diet (HFD) with or without NaB on gut microbiota. Bacterial communities were assayed in fecal samples using pyrosequencing of 16S rRNA gene amplicons. Western blot was performed using relevant antibodies to detect the protein expressions in liver and HepG2 cell extracts. Exercise and butyrate administration significantly reversed metabolic dysfunctions induced by HFD (P < 0.05). The number of Firmicutes and the proportion of Firmicutes to Bacteroidetes order were predominant in all HFD groups (P = 0.001). Exercise and butyrate supplementation significantly inhibited the relative abundance of lipopolysaccharide-producing phyla (P = 0.001). SESN2 and CRTC2 expression in the liver of mice were significantly increased after exercise (P < 0.05) and/or supplementation of butyrate (P < 0.05). Exercise enhances butyrate-producing fecal bacteria and increases butyrate production and consequently improves lipid metabolism through the butyrate-SESN2/CRTC2 pathway. Excess butyrate may reduce the proportion of probiotics and reverse the metabolic effects.