Kaposi's sarcoma-associated herpesvirus (KSHV) may be transmitted via sexual contacts, but limited information is available on KSHV infection status among sexually transmitted infection (STI) patients in China. The main objective of the present study was to determine the KSHV seroprevalence and its risk factors among male STI patients. A cross-sectional survey was conducted in three prefectures of Anhui province, China, between June and September 2013. A total of 1,600 male patients who visited an STI clinic were invited, and 1,372 participated in the study. Data were abstracted from the medical records for all the patients. Blood samples were collected and tested for antibodies to KSHV, HIV, HCV, and syphilis. Factors associated with KSHV seropositivity were examined using multivariable logistic regression analysis. The overall prevalence of KSHV, HIV, HCV, and syphilis was 13.3%, 0.7%, 0.6%, and 12.5%, respectively. After adjusting for potential confounders, KSHV infection was significantly associated with ever having anal sex with men (19 out of 30 males, OR: 8.64, 95%CI: 1.92–38.79) and HIV infection (six out of nine HIV-positive individuals, OR: 8.39, 95%CI: 1.80–39.04). There were no significant associations of KSHV infection with drug use, heterosexual sex behaviors, syphilis, and HCV. Our finding has shown that a relatively moderate prevalence of KSHV was found among male STI patients. While an increased risk for KSHV infection was observed among participants with homosexual contacts. Routine KSHV testing is recommended for male individuals attending STI clinics. J. Med. Virol. 88:304–311, 2016. © 2015 Wiley Periodicals, Inc.