To investigate the effects of dietary fibre on follicular atresia in pigs fed a high-fat diet, we fed thirty-two prepubescent gilts a basal diet (CON) or a CON diet supplemented with 300 g/d dietary fibre (fibre), 240 g/d soya oil (SO) or both (fibre + SO). At the 19th day of the 4th oestrus cycle, gilts fed the SO diet showed 112 % more atretic follicles and greater expression of the apoptotic markers, Bax and caspase-3, and these effects were reversed by the fibre diet. The abundance of SCFA-producing microbes was decreased by the SO diet, but this effect was reversed by fibre treatment. Concentrations of serotonin and melatonin in the serum and follicular fluid were increased by the fibre diet. Overall, dietary fibre protected against high fat feeding-induced follicular atresia at least partly via gut microbiota-related serotonin–melatonin synthesis. These results provide insight into preventing negative effects on fertility in humans consuming a high-energy diet.