ObjectivesTo assess the knowledge, attitude and practice (KAP) concerning healthcare-associated infections (HAIs) among healthcare givers and to identify the factors influencing KAP.DesignThis was a hospital-based, cross-sectional study.SettingTwo public hospitals in Wuhan, central China.ParticipantsParticipants were recruited among healthcare workers (HCWs) of one general hospital and one children’s hospital in Wuhan city between 1 June and 30 September 2019.Primary and secondary outcome measuresThe outcomes were KAPs concerning HAIs.ResultsData from 455 HCWs were included in the final data analysis. The mean scores of KAP and total KAP were 15.67±3.32, 25.00±2.75, 43.44±5.15 and 84.76±6.72, respectively. The following factors were significantly associated with the total KAP score concerning HAIs, explaining 61% of the variance (p<0.001): gender (β=2.36, 95% CI 1.11 to 4.40), age (β=6.65, 95% CI 5.07 to 7.74), position (β=7.02, 95% CI 3.88 to 8.45), type of employment (β=−1.08, 95% CI −2.08 to −0.07), with HAI education within last year (β=−2.98, 95% CI −4.23 to −1.72), with invasive operation authority (β=−4.22, 95% CI −5.46 to −2.99), antibacterial drug training (β=−4.38, 95% CI −5.45 to −3.31) and with antibacterial drug training and clinical consultation (β=−4.35, 95% CI −5.38 to −3.32).ConclusionThe controllable factors identified in this study can be used by hospital managers to implement measures that improve KAP among HCWs. Moreover, these measures should be customised, based on uncontrollable factors to suit the specific characteristics of medical staff and to improve KAP. Training programmes should be designed for medical workers to increase their awareness of HAIs and to foster positive attitudes and practices.