BackgroundMental health outcomes can be influenced by various factors, one of which has recently gained attention, namely food security. Food security is paramount to maintaining not only physical, but also mental health. There is an increasing need to understand the interplay between food insecurity (FI) and mental health outcomes, especially among vulnerable populations. The objective of this study was to investigate the effect of FI on psychological health (anxiety and depression) as well as to examine the modifying effect of socioeconomic position on this relationship.MethodsA cross-sectional study was conducted in Maputo City, Mozambique, in 1,842 participants. Data were collected through structured interviews using a modified version of the US Department of Agriculture Household Food Security Module to measure FI, and the Hospital Anxiety and Depression Scale to measure anxiety and depression. A composite variable for psychological health was created. Propensity score matching and interaction effect analyses were employed to examine the effects of FI on psychological health and the moderating role of socioeconomic position.ResultsOf the 1,174 participants randomly assigned to propensity score matching, 787 were exposed to FI while 387 were unexposed. The analysis revealed stark disparities in psychological health outcomes associated with FI. The risk of poor psychological health among those exposed to FI was 25.79%, which was significantly higher than the 0.26% in unexposed individuals. The risk difference was 25.54% points (95% CI: 22.44–28.63), with a risk ratio of 99.82. Our assessment of population attributable fractions indicated that nearly all the risk for poor psychological health in the exposed group could be ascribed to FI. The interaction effects analysis revealed that socioeconomic status modifies this relationship. Specifically, heads of food-insecure households with a lower socioeconomic position tended to report poor mental health compared to their food-secure counterparts with a higher position.ConclusionsThe findings underscore the profound impact of FI on the mental health of household heads in Maputo City, socioeconomic position being a significant modifier. Addressing household FI along with the socioeconomic position of household heads could be pivotal to mental health promotion, especially among vulnerable populations.