BackgroundNonoccupational post-exposure prophylaxis (NPEP) is a short course of medication taken to reduce the likelihood of acquiring human immunodeficiency virus (HIV) infection upon exposure. A review of the literature demonstrates an urgent need for an empirically validated instrument that measures detailed knowledge of NPEP among the key population of men who have sex with men (MSM).MethodsSemi-structured interviews, focus groups, and a cross-sectional survey with a sample of 419 MSM was conducted in 2018 in China to develop and psychometrically evaluate the new instrument, the NPEP Knowledge Scale. Exploratory and confirmatory factor analyses, differential item functioning analyses, and structural equation modeling were conducted using Mplus 7.4.ResultsThe NPEP Knowledge Scale demonstrated excellent reliability and validity. Cronbach’s alpha was 0.903. The range of item R2were 0.527–0.969,p’s < 0.001. Model estimated inter-item correlations ranged between 0.534 and 0.968. In addition, HIV knowledge, NPEP use, and NPEP knowledge were all significantly correlated.ConclusionsThe NPEP Knowledge Scale is suitable for research, program evaluation, and clinical and community services that require using NPEP to minimize the ever-present risk of new HIV infections.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12889-023-16206-5.