Diet shapes the gut microbiota which impacts hepatic lipid metabolism. Modifications in liver fat content are associated with metabolic disorders. We investigated the extent of dietary fat and fiber-induced alterations in the composition of gut microbiota and hepatic fatty acids (FAs). Mice were fed a purified low-fat diet (LFD) or high-fat diet (HFD) containing non-soluble fiber cellulose or soluble fiber inulin. HFD induced hepatic decreases in the amounts of C14:0, C16:1n-7, C18:1n-7 and increases in the amounts of C17:0, C20:0, C16:1n-9, C22:5n-3, C20:2n-6, C20:3n-6, and C22:4n-6. When incorporated in a LFD, inulin poorly affected the profile of FAs. However, when incorporated in a HFD, it (i) specifically led to an increase in the amounts of hepatic C18:0, C22:0, total polyunsaturated FAs (PUFAs), total n-6 PUFAs, C18:3n-3, and C18:2n-6, (ii) exacerbated the HFD-induced increase in the amount of C17:0, and (iii) prevented the HFD-induced increases in C16:1n-9 and C20:3n-6. Importantly, the expression/activity of some elongases and desaturases, as well as the gut microbiota composition, were impacted by the dietary fat and fiber content. To conclude, inulin modulated gut microbiota and hepatic fatty acid composition, and further investigations will determine whether a causal relationship exists between these two parameters.