The gut microbiota exerts a role in type 2 diabetes (T2D), and deviations from a mutualistic ecosystem layout are considered a key environmental factor contributing to the disease. Thus, the possibility of improving metabolic control in T2D by correcting gut microbiome dysbioses through diet has been evaluated. Here, we explore the potential of two different energy-restricted dietary approaches – the fibre-rich macrobiotic Ma-Pi 2 diet or a control diet recommended by Italian professional societies for T2D treatment – to correct gut microbiota dysbioses in T2D patients. In a previous 21-d open-label MADIAB trial, fifty-six overweight T2D patients were randomised to the Ma-Pi 2 or the control diet. For the present study, stools were collected before and after intervention from a subset of forty MADIAB participants, allowing us to characterise the gut microbiota by 16S rRNA sequencing and imputed metagenomics. To highlight microbiota dysbioses in T2D, the gut microbiota of thirteen normal-weight healthy controls were characterised. According to our findings, both diets were effective in modulating gut microbiome dysbioses in T2D, resulting in an increase of the ecosystem diversity and supporting the recovery of a balanced community of health-promoting SCFA producers, such as Faecalibacterium, Roseburia, Lachnospira, Bacteroides and Akkermansia. The Ma-Pi 2 diet, but not the control diet, was also effective in counteracting the increase of possible pro-inflammatory groups, such as Collinsella and Streptococcus, in the gut ecosystem, showing the potential to reverse pro-inflammatory dysbioses in T2D, and possibly explaining the greater efficacy in improving the metabolic control.