It is currently unknown whether associations between gut microbiota composition and type 2 diabetes (T2D) differ according to the ethnic background of individuals. Thus, we studied these associations in participants from two ethnicities characterized by a high T2D prevalence and living in the same geographical area, using the Healthy Life In Urban Settings (HELIUS) study. We included 111 and 128 T2D participants on metformin (Met-T2D), 78 and 49 treatment-naïve T2D (TN-T2D) participants, as well as a 1:1 matched group of healthy controls from, respectively, African Surinamese and South-Asian Surinamese descent. Fecal microbiome profiles were obtained through 16S rRNA gene sequencing. Univariate and machine learning analyses were used to explore the associations between T2D and the composition and function of the gut microbiome in both ethnicities, comparing Met-T2D and TN-T2D participants to their respective healthy control. We found a lower α-diversity for South-Asian Surinamese TN-T2D participants but no significant associations between TN-T2D status and the abundance of bacterial taxa or functional pathways. In African Surinamese participants, we did not find any association between TN-T2D status and the gut microbiome. With respect to Met-T2D participants, we identified several bacterial taxa and functional pathways with a significantly altered abundance in both ethnicities. More alterations were observed in South-Asian Surinamese. Some altered taxa and pathways observed in both ethnicities were previously related to metformin use. This included a strong negative association between the abundance of Romboutsia and Met-T2D status. Other bacterial taxa were consistent with previous observations in T2D, including reduced butyrate producers such as Anaerostipes hadrus. Hence, our results highlighted both shared and unique gut microbial biomarkers of Met-T2D in individuals from different ethnicities but living in the same geographical area. Future research using higher-resolution shotgun sequencing is needed to clarify the role of ethnicity in the association between T2D and gut microbiota composition.