Anti-acid drugs, proton pump inhibitor (PPI) and histamine-2 blocker (H2-blocker), are commonly prescribed to treat gastrointestinal disorders. These anti-acid drugs alter gut microbiota in the general population, but their effects are not known in hemodialysis patients. Hence, we investigated the microbiota composition in hemodialysis patients treated with PPIs or H2-blocker. Among 193 hemodialysis patients, we identified 32 H2-blocker users, 23 PPI users, and 138 no anti-acid drug subjects. Fecal samples were obtained to analyze the gut microbiome using 16S RNA amplicon sequencing. Differences in the microbial composition of the H2-blocker users, PPI users, and controls were assessed using linear discriminant analysis effect size and the random forest algorithm. The species richness or evenness (α-diversity) was similar among the three groups, whereas the inter-individual diversity (β-diversity) was different between H2-blocker users, PPI users, and controls. Hemodialysis patients treated with H2-blocker and PPIs had a higher microbial dysbiosis index than the controls, with a significant increase in the genera Provetella 2, Phascolarctobacterium, Christensenellaceae R-7 group, and Eubacterium oxidoreducens group in H2-blocker users, and Streptococcus and Veillonella in PPI users. In addition, compared to the H2-blocker users, there was a significant enrichment of the genera Streptococcus in PPI users, as confirmed by the random forest analysis and the confounder-adjusted regression model. In conclusion, PPIs significantly changed the gut microbiota composition in hemodialysis patients compared to H2-blocker users or controls. Importantly, the Streptococcus genus was significantly increased in PPI treatment. These findings caution against the overuse of PPIs.