Hospital environment is paid great attention to due to its potential threat in transmission of pathogens and antibiotic resistances. This study was designed to evaluate the alteration of gut microbiome in medical workers compared to non-medical controls.175 healthy medical workers (1-3 months short-term workers, n = 80; >1 year long-term workers, n = 95) and 80 healthy normal controls.Fecal samples of all subjects were analyzed using the 16S rRNA gene sequencing. Medical workers exhibited remarkable deviation in gut microbial within-sample diversity and enterotypes stratification, and shift in overall microbial structure. Short-term workers were significantly more abundant in taxa including Lactobacillus, Butyrivibrio, Clostridiaceae\_Clostridium, Ruminococcus, Dialister, Bifidobacterium, Odoribacter and Desulfovibrio, and with lower abundances of Bacteroides and Blautia compared with the controls. While long-term workers were enriched in taxa including Dialister, Veillonella, Clostridiaceae\_Clostridium, Bilophila, Desulfovibrio, Pseudomonas and Akkermansia, with lower abundances of Bacteroides and Coprococcus compared with the controls. In addition, medical worker's working years (short-term vs. long-term), hospital department (resident doctor vs. nursing staff) and work position (ICU vs. not-ICU) revealed considerable effects on their gut microbiome. Moreover, by analyzing the environmental samples (n = 9) around the inpatient wards and the hospital, we showed that the gut microbiota of medical workers was closer to environmental microbiota than that of the normal controls, probably in correlation to lasting exposure to the pathogenic taxa (e.g. Pseudomonas) in health workers.Our findings demonstrated structural changes in the gut microbial community of the medical workers.