Enterocytozoon bieneusi causes microsporidiosis, a condition with complex epidemiology involving both direct and indirect transmission routes. To assess the potential role of synanthropic rodents and flies in the transmission of this pathogen, a total of 277 cattle fecal samples, 199 synanthropic rodents, and 50 batches of 20 flies were collected from a cattle farm. These samples were screened for the presence of E. bieneusi by PCR and sequencing of the internal transcribed spacer (ITS) region of the rRNA gene. The positive rates of cattle, synanthropic rodents, and flies were 11.9% (33/277), 4.0% (8/199) and 12.0% (6/50), respectively. Nineteen genotypes were identified, including 11 known genotypes (BEB6, I, COS-I, EbpC, D, J, CHS5, CHG1 to CHG3 and CHG14) and eight novel genotypes (named CHC9 to CHC16). The dominant genotype detected in the present study, BEB6, was found in all three categories of hosts. Moreover, human pathogenic genotypes D and EbpC were also observed in both synanthropic rodents and flies. These results demonstrate that synanthropic rodents and flies may act as biological disseminator or mechanical vector in the transmission of microsporidiosis to humans. Efforts should be made to minimize threats from these commensal animals to public health.