A high-carbohydrate diet could achieve a protein-sparing effect, but it may cause negative impacts on the growth condition of fish due to their poor utilisation ability of carbohydrate. How to reduce the adverse effects caused by a high-carbohydrate diet is important for the development of aquaculture. In the present study, we aimed to identify whether inulin could attenuate the metabolic syndrome caused by a high-carbohydrate diet in fish. Nile tilapia (Oreochromis niloticus) (1·19 (sd 0·01) g) were supplied with 35 % carbohydrate (CON), 45 % carbohydrate (HC) and 45 % carbohydrate + 5 g/kg inulin (HCI) diets for 10 weeks. The results showed that addition of inulin improved the survival rate when fish were challenged with Aeromonas hydrophila, indicating that inulin had an immunostimulatory effect. Compared with the HC group, the HCI group had lower lipid accumulation in liver and the gene expression analyses indicated that addition of inulin down-regulated genes related to lipogenesis and up-regulated genes relevant to β-oxidation significantly (P < 0·05). Higher liver glycogen and glucose tolerance were found in the HCI group compared with the HC group (P < 0·05). These results indicated that inulin could alleviate the metabolic syndrome induced by a high-carbohydrate diet. Furthermore, addition of inulin to a high-carbohydrate diet changed the intestinal bacterial composition and significantly increased the concentration of acetic acid and propionic acid in fish gut which have the potential to increase pathogen resistance and regulate metabolic characteristics in fish. Collectively, our results demonstrated a possible causal role for the gut microbiome in metabolic improvements induced by inulin in fish.