Background: Immunoglobulin G4-related disease (IgG4-RD) and systemic sclerosis (SSc) are rare autoimmune diseases characterized by the presence of CD4+ cytotoxic T cells in the blood as well as inflammation and fibrosis in various organs, but they have no established etiologies. Similar to other autoimmune diseases, the gut microbiome might encode disease-triggering or disease-sustaining factors. Methods: The gut microbiomes from IgG4-RD and SSc patients as well as healthy individuals with no recent antibiotic treatment were studied by metagenomic sequencing of stool DNA. De novo assembly-based taxonomic and functional characterization, followed by association and accessory gene set enrichment analysis, were applied to describe microbiome changes associated with both diseases. Results: Microbiomes of IgG4-RD and SSc patients distinctly separated from those of healthy controls: numerous opportunistic pathogenic Clostridium and typically oral Streptococcus species were significantly overabundant, while Alistipes, Bacteroides, and butyrate-producing species were depleted in the two diseases compared to healthy controls. Accessory gene content analysis in these species revealed an enrichment of Th17-activating Eggerthella lenta strains in IgG4-RD and SSc and a preferential colonization of a homocysteine-producing strain of Clostridium bolteae in SSc. Overabundance of the classical mevalonate pathway, hydroxyproline dehydratase, and fibronectin-binding protein in disease microbiomes reflects potential functional differences in host immune recognition and extracellular matrix utilization associated with fibrosis. Strikingly, the majority of species that were differentially abundant in IgG4-RD and SSc compared to controls showed the same directionality in both diseases. Compared with multiple sclerosis and rheumatoid arthritis, the gut microbiomes of IgG4-RD and SSc showed similar signatures; in contrast, the most differentially abundant taxa were not the facultative anaerobes consistently identified in inflammatory bowel diseases, suggesting the microbial signatures of IgG4-RD and SSc do not result from mucosal inflammation and decreased anaerobism. Conclusions: These results provide an initial characterization of gut microbiome ecology in fibrosis-prone IgG4-RD and SSc and reveal microbial functions that offer insights into the pathophysiology of these rare diseases.