The egg production of captive African penguins differs considerably between individuals. An understanding of the physiological differences in African penguins with relatively greater and lesser egg production is meaningful for the captive breeding program of this endangered species. The objective of this study was to investigate differential microbial composition and metabolites in captive African penguins with different egg production. Fecal samples were collected from captive female African penguins during the breeding season. The results of 16 S rRNA gene sequencing showed that African penguins with different egg production had similar microbial diversities, whereas a significant difference was observed between their microbial community structure. African penguins with relatively greater egg production exhibited a higher relative abundance of Alphaproteobacteria, Rhizobiales, Bradyrhizobiaceae, Bradyrhizobium and Bosea. Meanwhile, penguins with relatively lesser egg production had an increased proportion of Klebsiella and Plesiomonas. We further identified a total of 1858 metabolites in female African penguins by liquid chromatography-mass spectrometry analysis. Among these metabolites, 13 kinds of metabolites were found to be significantly differential between African penguins with different egg production. In addition, the correlation analysis revealed that the egg production had significant correlations with most of the differential microbial bacteria and metabolites. Our findings might aid in understanding the potential mechanism underlying the phenomenon of abnormal egg production in captive African penguins, and provide novel insights into the relationship between gut microbiota and reproduction in penguins.