Objective. This study aimed to estimate the prevalence of human immunodeficiency virus (HIV) testing, identify factors associated with HIV testing among male students who have engaged in sexual behaviour in Zhejiang province, and provide a scientific basis for the prevention and control of HIV infection on campus. Methods. Stratified cluster random sampling analysis was performed, which included general characteristics, sexual attitudes, sexual behaviours, information on HIV testing, and self-risk assessment for HIV infection. Univariate and multivariate logistic regression analyses were conducted to identify the influencing factors. Results. Among 2734 male students who have engaged in sexual behaviour, 319 (11.7%) had undergone HIV antibody testing in the previous year. The results of multivariate analysis demonstrated that the participants who were in the junior grade level (adjusted odds ratio (AOR) = 1.59, 95% confidence interval (95% CI): 1.10–2.30) exhibited acceptance to male homosexual behaviour (AOR = 1.73, 95% CI: 1.19–2.52), had been exposed to testing publicity in the previous year (AOR = 1.51, 95% CI: 1.06–2.15), had been exposed to self-risk assessment for HIV infection (AOR = 2.66, 95% CI: 1.99–3.55), had male or bisexual partners (AOR = 1.60, 95% CI: 1.05–2.46), had a score for the scale indicating awareness of different testing methods between 2 and 5 (AOR = 2.19, 95% CI: 1.51–3.16) or greater than 6 (AOR = 1.49, 95% CI: 1.01–2.66), and had a score for the scale indicating knowledge of different testing facilities between 3 and 5 (AOR = 1.63, 95% CI: 1.00–2.66) were inclined to engage in HIV testing. Conclusions. In this study, the proportion of HIV-testing among male students who have engaged in sexual behaviour was low. This study revealed that students who exhibited acceptance to male homosexual behaviours had been exposed to publicity for HIV testing or a self-risk assessment for HIV infection which were more inclined to engage in HIV testing. Our study underscores the urgent need to enhance educational interventions concerning HIV risks and warnings as part of the health education curriculum on campus. The graveness of the AIDS epidemic among students necessitates this emphasis. Moreover, we recommend deploying condom-dispensing machines or HIV testing facilities across the campus for easy access to preventive and testing services for HIV.