Myasthenia gravis (MG) is a devastating acquired autoimmune disease. Previous studies have observed that disturbances of gut microbiome may attribute to the development of MG through fecal metabolomic signatures in humans. However, whether there were differential gut microbial and fecal metabolomic phenotypes in different subtypes of MG remains unclear. Here, our objective was to explore whether the microbial and metabolic signatures of ocular (OMG) and generalized myasthenia gravis (GMG) were different, and further identify the shared and distinct markers for patients with OMG and GMG. In this study, 16S ribosomal RNA (rRNA) gene sequencing and gas chromatographymass spectrometry (GC/MS) were performed to capture the microbial and metabolic signatures of OMG and GMG, respectively. Random forest (RF) classifiers was used to identify the discriminative markers for OMG and GMG. Compared with healthy control (HC) group, GMG group, but not OMG group, showed a significant decrease in α-phylogenetic diversity. Both OMG and GMG groups, however, displayed significant gut microbial and metabolic disorders. Totally, we identified 20 OTUs and 9 metabolites specific to OMG group, and 23 OTUs and 7 metabolites specific to GMG group. Moreover, combinatorial biomarkers containing 15 discriminative OTUs and 2 differential metabolites were capable of discriminating OMG and GMG from each other, as well as from HCs, with AUC values ranging from 0.934 to 0.990. In conclusion, different subtypes of MG harbored differential gut microbiota, which generated discriminative fecal metabolism.