Dysbiosis of the gut microbiota's composition and function is important in developing insulin resistance and diabetes. Diabetes has also been linked to changes in the circulating and fecal metabolites. Evidence suggests the associations between the gut microbiota and the aberrant diabetes-related metabolome. Metabolites play a crucial role in the host-microbiota interactions. Researchers have used a combination of metagenomic and metabolomic approaches to investigate the relationships between gut microbial dysbiosis and metabolic abnormalities in diabetes. We summarized current discoveries on the associations between the gut microbiota and metabolites in type 1 diabetes, type 2 diabetes, and gestational diabetes mellitus in the scoping review. According to research, the gut microbiota changes might involve in the development of diabetes through modulating the host's metabolic pathways such as immunity, energy metabolism, lipid metabolism, and amino acid metabolism. These results add to our understanding of the interplay between the host and gut microbiota metabolism.