Background: The association between neighbourhood crime and major depression (MD) has been described before but previous studies may be limited by biases in self-reported data and the use of homogenous study populations. Our study aimed to examine the association between neighbourhood crime and clinically diagnosed MD among the immigrant and non-immigrant populations in Sweden. Methods: A retrospective cohort study was performed, which included non-immigrants and first- and second-generation immigrants residing in Sweden, who were born between 1960 and 1996. We used linked Swedish national registers, geospatial analysis and multilevel logistic regression models to examine the potential effect of neighbourhood crime on the odds of major depression between January 1, 2012, and December 31, 2015. Results: Overall, individuals living in neighbourhoods with high levels of neighbourhood crime had higher odds of MD than those who did not. There was a significant interaction by immigrant status; the odds of MD among those with non-immigrant backgrounds were more strongly associated with increases in neighbourhood crime, after adjusting for potential confounders. Male and female immigrants born outside Sweden did not seem to be affected by increases in neighbourhood crime. Conclusion: The apparent effect of increases in neighbourhood crime on the odds of MD seemed to differ between those of different immigrant statuses. Future research should aim to explore the possible mechanisms behind the differences in the rates of MD among the non-immigrant and immigrant populations in neighbourhoods with high crime.