ObjectiveLockdown has impacts on people’s living conditions and mental health. The study aims to assess the relations between social impact and mental health among adults living in Spain during COVID-19 lockdown measures, taking a gender-based approach into account.Design, setting and participantsWe conducted a cross-sectional study among adults living in Spain during the lockdown of COVID-19 with an online survey from 8 April to 28 May 2020. The main variable was mental health measured by Generalized Anxiety Disorder Scale for anxiety and the Patient Health Questionnaire for depression. Sex-stratified multivariate ordinal logistic regression models were constructed to assess the association between social impact variables, anxiety and depression.ResultsA total of 7053 people completed this survey. A total of 31.2% of women and 17.7% of men reported anxiety. Depression levels were reported in 28.5% of women and 16.7% of men. A higher proportion of anxiety and depression levels was found in the younger population (18–35 years), especially in women. Poorer mental health was mainly related to fear of COVID-19 infection, with higher anxiety levels especially in women (adjusted ordinal OR (aOR): 4.23, 95% CI 3.68 to 4.87) and worsened economy with higher levels of depression in women (aOR: 1.51, 95% CI 1.24 to 1.84), and perceived inadequate housing to cope with lockdown was especially associated with anxiety in men (aOR: 2.53, 95% CI 1.93 to 3.44).ConclusionThe social impact of the lockdown is related to gender, age and socioeconomic conditions. Women and young people had worse mental health outcomes during lockdown. It is urgent to establish strategies for public health emergencies that include mental health and its determinants, taking a gender-based approach into account, in order to reduce health inequities.