The development of non-invasive, inexpensive, and effective early diagnosis tests for gastric and small-bowel lesions is an urgent requirement. The introduction of magnetically guided capsule endoscopy (MGCE) has aided examination of the small bowel for diagnoses. However, the distribution of the fecal microbiome in abnormal erosions of the stomach and small bowel remains unclear. Herein, alternations in the fecal microbiome in three groups [normal, small-bowel inflammation, and chronic gastritis (CG)] were analyzed by metagenomics and our well-developed method [individual-specific edge-network analysis (iENA)]. In addition to the dominant microbiota identified by the conventional differential analysis, iENA could recognize novel network biomarkers of microbiome communities, such as the genus Bacteroide in CG and small-bowel inflammation. Combined with differential network analysis, the network-hub microbiota within rewired microbiota networks revealed high-ranked iENA microbiota markers, which were disease specific and had particular pathogenic functions. Our findings illuminate the components of the fecal microbiome and the importance of specific bacteria in CG and small-bowel erosions, and could be employed to develop preventive and non-invasive therapeutic strategies.