Consumption of a high-fat diet (HFD), which is associated with chronic 'low-grade' systemic inflammation, alters the gut microbiota (GM). The aim of the present study was to investigate the ability of an oleic acid-derived compound (S1) and a combination of n-3 fatty acids (EPA and DHA, S2) to modulate both body weight and the GM in HFD-induced obese mice. A total of eighty mice were fed either a control diet or a HFD, non-supplemented or supplemented with S1 or S2. At week 19, faeces were collected in order to analyse the GM. Group-specific primers for accurate quantification of several major bacterial groups from faecal samples were assayed using quantitative PCR. The HFD induced an increase in body weight, which was reduced by supplementation with S1. Furthermore, S1 supplementation markedly increased total bacterial density and restored the proportions of bacteria that were increased (i.e. clostridial cluster XIVa and Enterobacteriales) or decreased (i.e. Bifidobacterium spp.) during HFD feeding. S2 supplementation significantly increased the quantities of Firmicutes (especially the Lactobacillus group). Correlation analysis revealed that body weight correlated positively with the phylum Firmicutes and clostridial cluster XIVa, and negatively with the phylum Bacteroidetes. In conclusion, the consumption of a HFD induced changes in the faecal microbiota, which were associated with the appearance of an obese phenotype. Supplementation of the HFD with S1 counteracted HFD-induced gut dysbiosis, together with an improvement in body weight. These data support a role for certain fatty acids as interesting nutrients related to obesity prevention.