Background: Chemsex has been defined as the deliberate use of drugs for prolonged sexual intercourse between gay and bisexual men and other men who have sex with men (MSM). Drugs associated with chemsex can trigger mental health problems such as anxiety, depression, risk of psychosis and suicidal ideation, social isolation, stigmatization, and even loss of impulse control and lack of coping strategies. Currently, the increase in illicit drugs in a sexual context is considered an outbreak of a public health emergency. Objective: The aim of this study is the construction and validation of the Chem-Sex Inventory (CSI), a new scale to assess the mental health risk of chemsex behaviors. Methods: A cross-sectional design was conducted to study 563 participants. Data were collected through an online questionnaire between January and April 2023, and the construct validity of the CSI was assessed through exploratory and confirmatory factor analysis. Results: The sample was, on average, 36 years old (SD: ±9.2). The majority of gender identity was cisgender (97.7%). A factor structure was found that can be summarized in four dimensions: emotional instability, risk of psychosis, altered body perception, and risk of suicide. The confirmatory factor analysis (CFA) presents adequate reliability values, with a Cronbach's alpha above 0.87 for all dimensions and a McDonald's omega above 0.88 with a good fit of the 42 items. Conclusions: Our study has shown that the Chem-Sex Inventory (CSI) scale has factorial validity and could be used in clinical practice and research to measure the behavioral contribution of the chemsex phenomenon in MSM.