Evidence is accumulating that the gut microbiome is involved in the aetiology of obesity and obesity-related complications such as nonalcoholic fatty liver disease (NAFLD), insulin resistance and type 2 diabetes mellitus (T2DM). The gut microbiota is able to ferment indigestible carbohydrates (for example, dietary fibre), thereby yielding important metabolites such as short-chain fatty acids and succinate. Numerous animal studies and a handful of human studies suggest a beneficial role of these metabolites in the prevention and treatment of obesity and its comorbidities. Interestingly, the more distal colonic microbiota primarily ferments peptides and proteins, as availability of fermentable fibre, the major energy source for the microbiota, is limited here. This proteolytic fermentation yields mainly harmful products such as ammonia, phenols and branched-chain fatty acids, which might be detrimental for host gut and metabolic health. Therefore, a switch from proteolytic to saccharolytic fermentation could be of major interest for the prevention and/or treatment of metabolic diseases. This Review focuses on the role of products derived from microbial carbohydrate and protein fermentation in relation to obesity and obesity-associated insulin resistance, T2DM and NAFLD, and discusses the mechanisms involved.