Fasting is increasingly popular to manage metabolic and inflammatory diseases. Despite the role that the human gut microbiota plays in health and diseases, little is known about its composition and functional capacity during prolonged fasting when the external nutrient supply is reduced or suppressed. We analysed the effects of a 10-d periodic fasting on the faecal microbiota of fifteen healthy men. Participants fasted according to the peer-reviewed Buchinger fasting guidelines, which involve a daily energy intake of about 1046 kJ (250 kcal) and an enema every 2 d. Serum biochemistry confirmed the metabolic switch from carbohydrates to fatty acids and ketones. Emotional and physical well-being were enhanced. Faecal 16S rRNA gene amplicon sequencing showed that fasting caused a decrease in the abundance of bacteria known to degrade dietary polysaccharides such as Lachnospiraceae and Ruminococcaceae. There was a concomitant increase in Bacteroidetes and Proteobacteria (Escherichia coli and Bilophila wadsworthia), known to use host-derived energy substrates. Changes in taxa abundance were associated with serum glucose and faecal branched-chain amino acids (BCAA), suggesting that fasting-induced changes in the gut microbiota are associated with host energy metabolism. These effects were reversed after 3 months. SCFA levels were unchanged at the end of the fasting. We also monitored intestinal permeability and inflammatory status. IL-6, IL-10, interferon γ and TNFα levels increased when food was reintroduced, suggesting a reactivation of the postprandial immune response. We suggest that changes in the gut microbiota are part of the physiological adaptations to a 10-d periodic fasting, potentially influencing its beneficial health effects.