Emerging evidence has shown the age-related changes in gut microbiota, but few studies were conducted to explore the effects of age on the gut microbiota in patients with major depressive disorder (MDD). This study was performed to identify the age-specific differential gut microbiota in MDD patients. In total, 70 MDD patients and 71 healthy controls (HCs) were recruited and divided into two groups: young group (age 18-29 years) and middle-aged group (age 30-59 years). The 16S rRNA gene sequences were extracted from the collected fecal samples. Finally, we found that the relative abundances of Firmicutes and Bacteroidetes were significantly decreased and increased, respectively, in young MDD patients as compared with young HCs, and the relative abundances of Bacteroidetes and Actinobacteria were significantly decreased and increased, respectively, in middle-aged MDD patients as compared with middle-aged HCs. Meanwhile, six and 25 differentially abundant bacterial taxa responsible for the differences between MDD patients (young and middle-aged, respectively) and their respective HCs were identified. Our results demonstrated that there were age-specific differential changes on gut microbiota composition in patients with MDD. Our findings would provide a novel perspective to uncover the pathogenesis underlying MDD.