Study investigating mpox infection and its association with sexual behavior among men who have sex with men (MSM) in China was lacking. This observational survey aimed to provide evidence on detail characteristics of mpox cases and sexual behavior, then analyze their relationship among MSM in China to help formulate prevention and control policies. An anonymous cross‐sectional study was conducted in 27 MSM social organizations across 21 provinces, municipalities, and autonomous regions from July 31 to August 4, 2023. A safe sexual behavior index was constructed based on three risky sexual behaviors in the last month, including condomless anal intercourse, commercial sex and group sex. High safe sexual behavior indicated that the participant engaged in none of the three, and low safe sexual behavior indicated that they engaged in all three behaviors; otherwise, moderate safe sexual behavior was indicated. Among 7538 MSM, the prevalence of mpox was 0.73% (55/7538). The proportion of high safe sexual behavior was 79.64% (6003/7538). The crude prevalence of mpox was lower in the high safe sexual behavior group (0.35%, 21/6003), compared with the low (12.12%, 8/66) and moderate safe (1.78%, 26/1469) sexual behavior group. In the multivariable‐adjusted analysis, after adjusting for all covariates, compared with low safe sexual behavior group, moderate safe sexual behavior group (aOR = 0.21; 95% CI = 0.08, 0.54) and high safe sexual behavior group (aOR = 0.04; 95% CI = 0.02, 0.12) both had lower risk of mpox. Of three sexual behaviors, MSM who reported no commercial sex had the lowest risk of mpox (aOR = 0.23; 95% CI = 0.13, 0.41), compared with those who reported commercial sex in the last month. The other two safe sexual behaviors both were associated with lower risk of mpox (no group sex vs. group sex: aOR = 0.15; 95% CI = 0.08, 0.28; no condomless anal intercourse vs. condomless anal intercourse: aOR = 0.23; 95% CI = 0.13, 0.41). The prevalence of mpox virus infection was nearly 1% among MSM in China. Strengthening mpox surveillance, emphasizing safe sexual behavior in health education are essential for the control of mpox among MSM in China.