IntroductionMelophagus ovinus, a parasite on the body surface of sheep, directly attacks the host through biting and sucking blood and may also transmit pathogens in the process. There are currently only a few studies on the microbial composition of M. ovinus, while there are no such studies on pupae.MethodsIn this study, samples AT-1 to AT-4 each contained four M. ovinus individuals, while sample AT-5 comprised four M. ovinus pupae, all used for metagenomic sequencing and analysis. Melophagus ovinus adults and pupae were collected from four regions in Xinjiang, China. DNA was extracted from the samples, amplified, and sequenced using the Illumina Novaseq 6000 System; finally, the sequencing data were analyzed using molecular biology software.Results and discussionFrom all samples, a total of 32 phyla, comprising 372 genera and 1,037 species, were detected. The highest microbial diversity was observed in Kuqa City (AT-2) and Qira County (AT-4). Pupae exhibited 40 unique microbial genera (AT-5) but did not have the highest microbial diversity. Proteobacteria was the dominant phylum in all samples. The dominant genera included Bartonella, Wolbachia, Pseudomonas, and Arsenophonus. This is the first study to report most of the bacteria (e.g., Pseudomonas versuta and Arsenophonus nasoniae), fungi (e.g., Saitoella complicata), viruses (e.g., Orf virus and Wolbachia phage WO), and protozoa (e.g., Trypanosoma theileri and Babesia bigemina) in M. ovinus. This study has enriched the microbial diversity data of M. ovinus, and the pathogens it carries may pose a threat to public health safety and the economy of related industries, necessitating further research to develop effective biological control strategies.