I investigate the relationship between drug-trafficking organization (DTO) presence and violence and school leaving in upper-secondary education in Mexico at the municipality level from 2000-2017. I rely on a fixed-effects model and find that both homicides and DTO presence increase school leaving rates among upper-secondary school students in Mexico by 0.1 and 1.2 percentage points, respectively. These results are understood through the capabilities approach framework to argue that violent crime and the presence of DTOs are influential factors in the level of educational attainment in a municipality because they limit the freedom of students to continue their education.