ObjectiveIncreasing evidence has shown that the microbiota-gut-brain axis (MGB) is involved in the mechanism of major depressive disorder (MDD). However, the relationship between the gut microbiome and brain function in MDD patients has not been determined. Here, we intend to identify specific changes in the gut microbiome and brain function in first-episode, drug-naïve MDD patients and then explore the associations between the two omics to elucidate how the MGB axis plays a role in MDD development. MethodsWe recruited 38 first-episode, drug-naïve MDD patients and 37 healthy controls (HC). The composition of the fecal microbiome and neural spontaneous activity alterations were examined using 16S rRNA gene amplicon sequencing analysis and regional homogeneity (ReHo). Spearman correlation analyses were conducted to assess the associations between the gut microbiome and brain function. ResultsCompared with HC, MDD patients exhibited distinct alterations in the gut microbiota and elevated ReHo in the frontal regions. In the MDD group, a positive relationship was noted between the relative abundance of Blautia and the HAMD-17 and HAMA scores, as well as between the relative abundance of Oxalobacteraceae and the HAMD-17 score. The relative abundances of Porphyromonadaceae and Parabacteroides were negatively correlated with the ReHo values of frontal regions. LimitationsOur study utilized a cross-sectional design, and the number of subjects was relatively small. ConclusionWe found that some specific gut microbiomes were associated with frontal function, and others were associated with clinical symptoms in MDD patients, which may support the role of the MGB axis underlying MDD.