Diabetes Mellitus (DM) is an inflammatory clinical entity with different mechanisms involved in its physiopathology. Among these, the dysfunction of the gut microbiota stands out. Currently, it is understood that lipid products derived from the gut microbiota are capable of interacting with cells from the immune system and have an immunomodulatory effect. In the presence of dysbiosis, the concentration of lipopolysaccharides (LPS) increases, favoring damage to the intestinal barrier. Furthermore, a pro-inflammatory environment prevails, and a state of insulin resistance and hyperglycemia is present. Conversely, during eubiosis, the production of short-chain fatty acids (SCFA) is fundamental for the maintenance of the integrity of the intestinal barrier as well as for immunogenic tolerance and appetite/satiety perception, leading to a protective effect. Additionally, it has been demonstrated that alterations or dysregulation of the gut microbiota can be reversed by modifying the eating habits of the patients or with the administration of prebiotics, probiotics, and symbiotics. Similarly, different studies have demonstrated that drugs like Metformin are capable of modifying the composition of the gut microbiota, promoting changes in the biosynthesis of LPS, and the metabolism of SCFA.