The ruminant gut microbial community's importance has been widely acknowledged due to its positive roles in physiology, metabolism, and health maintenance. Diarrhea has been demonstrated to cause adverse effects on gastrointestinal health and intestinal microecosystem, but studies regarding diarrheal influence on gut microbiota in Giraffa camelopardalis have been insufficient to date. Here, this study was performed to investigate and compare gut microbial composition and variability between healthy and diarrheic G. camelopardalis. The results showed that the gut microbial community of diarrheal G. camelopardalis displayed a significant decrease in alpha diversity, accompanied by distinct alterations in taxonomic compositions. Bacterial taxonomic analysis indicated that the dominant bacterial phyla (Proteobacteria, Bacteroidetes, and Firmicutes) and genera (Escherichia Shigella and Acinetobacter) of both groups were the same but different in relative abundance. Specifically, the proportion of Proteobacteria in the diarrheal G. camelopardalis was increased as compared with healthy populations, whereas Bacteroidetes, Firmicutes, Tenericutes, and Spirochaetes were significantly decreased. Moreover, the relative abundance of one bacterial genus (Comamonas) dramatically increased in diarrheic G. camelopardalis, whereas the relative richness of 18 bacterial genera decreased compared with healthy populations. Among them, two bacterial genera (Ruminiclostridium_5 and Blautia) cannot be detected in the gut bacterial community of diarrheal G. camelopardalis. In summary, this study demonstrated that diarrhea could significantly change the gut microbial composition and diversity in G. camelopardalis by increasing the proportion of pathogenic to beneficial bacteria. Moreover, this study first characterized the distribution of gut microbial communities in G. camelopardalis with different health states. It contributed to providing a theoretical basis for establishing a prevention and treatment system for G. camelopardalis diarrhea.