Background. Sexual and gender minorities (SGM) who perform sex work are susceptible to sexually transmitted infections and substance abuse that can lead to chronic diseases, as well as discrimination and violence that deteriorate their mental health. Aim. To evaluate the association between a history of sex work and health problems in the sexual and gender minority population from Peru. Methods. A cross-sectional study was conducted based on the data of the first virtual survey for LGBTI people in Peru in 2017. The prevalence of self-reported chronic diseases, infectious diseases, and mental health problems in the last 12 months and their association with the history of sex work were evaluated. Adjusted prevalence ratios (APR) with 95% confidence intervals were calculated using Poisson regression with robust variance. Results. We analyzed data from 10629 people, of which 7.0% performed sex work. The prevalence of chronic diseases, infectious diseases, and mental health problems was 13.0%, 10.4%, and 23.7%, respectively. A significant association was found between a history of sex work with chronic diseases (APR: 1.25, 95% CI: 1.04–1.50), infectious diseases (APR: 2.11, 95% CI: 1.86–2.41), and mental health problems (APR: 1.27, 95% CI, 1.12–1.45). Conclusion. We found evidence that chronic diseases, infectious diseases, and mental health problems are associated with sex work history among the SGM population in Peru. There is a need to provide health interventions focused on disease prevention and control for this population.