Objective To investigate the current status of occupational environment support, occupational satisfaction, and job competence of hospital infection prevention and control personnel, and to explore the mediating effect of occupational satisfaction on the relationship between occupational environment support and job competence, in order to provide reference and guidance for effectively improving the job competence of hospital infection prevention and control personnel. Methods A survey questionnaire was distributed to various levels and types of medical institutions in Shanghai through the platform of the Shanghai Hospital Infection Quality Control Center. The questionnaire included the Occupational Environment Support Scale, Occupational Satisfaction Scale, and Job Competency Assessment Scale. The mediating effect of occupational satisfaction on the relationship between occupational environment support and job competency of hospital infection prevention and control personnel was analyzed. Results A total of 1027 hospital infection prevention and control personnel from 728 medical institutions participated in this survey, with 989 valid questionnaires and an effective response rate of 96.3%. There were statistically significant differences in the job competency scores of hospital infection prevention and control personnel based on gender, years of experience in infection control work, professional background, highest education level, professional title, job nature, type of medical institution, and annual income (P<0.05). The total score of job competence for hospital infection prevention and control personnel was 301.0 (267.5, 326.0), the total score of occupational environment support was 21.44±3.66, and the total score of occupational satisfaction was 19.25±2.78. The occupational environment support of hospital infection prevention and control personnel was positively correlated with occupational satisfaction and job competence (r=0.373, 0.339; P<0.001), and occupational satisfaction was positively correlated with occupational environment support (r=0.547, P<0.001). The mediating effect of job satisfaction on the occupational environment support and job competence was 0.085, accounting for 22.8% of the total effect. Conclusion Occupational satisfaction partially mediates the relationship between occupational environment support and job competence, and the mediating effect is significant.