Studies in Europe and North America have shown that the mental health of individuals experiencing homelessness (IEHs) is worse than that of the general population. The objective of this study was to analyze the mental health of IEHs in Spain. A retrospective cohort study (observational study) of the health of 3,854 IEHs was conducted, according to age and gender, using diagnoses registered in the health service, over the 15 years between 2006 and 2020. Of this population, 31.6% were diagnosed with some sort of substance use disorder (SUD), mainly alcohol-related (18.1%), 20.1% had a mental disorder not related to drugs, and 11.5% had a dual disorder. Younger people had more mental health problems. This study-the first large study of IEHs in Spain-highlights significant differences in mental health and addictions according to gender and age. In general, Spanish IEHs have better mental health for all of the analyzed diagnostics than other populations internationally.