Parasitic infections are associated with profound changes in the structure and function of the gut microbiome in various host-parasite systems. Here we examined the microbial composition and function in the abomasum, proximal colon and feces of Haemonchus contortus-infected goats after a partial anthelmintic drug clearance. A single-dose treatment of H. contortus-infected goats with Cydectin (moxidectin) resulted in an 83.9 % and 61.8 % reduction in fecal egg counts (EPG) and worm burden, respectively (P < 0.01), and restored abomasal pH to a normal baseline level. The treatment significantly increased the abundance of Proteobacteria, particularly that of Campylobacter, in the proximal colon. It also significantly affected several basic pathways, including bacterial secretion, butyrate metabolism, and LPS biosynthesis, and seemingly reduced the cellulolytic capacity in the colon. Several network modules displayed a strong correlation with EPG and worm burden. The Mantel test indicated a strong correlation between treatment related network topologies of the operational taxonomic units (OTU) belonging to Actinobacteria and Rikenellaceae and EPG and worm burden levels, respectively. Furthermore, microbial signatures that may better predict anthelmintic efficacy were identified. A signature or balance represented by the log ratio of the abundance of Verrucomicrobiaceae and Camplyobacteraceae had a strong correlation with EPG (r = 0.80). These novel insights into the interactions between H. contortus and gut microbiome in the caprine host and the consequence of a partial anthelmintic clearance on animal health and well-being may facilitate the design of more effective next-generation anthelmintics.