Faced with punishing severe offenders, why do some prefer imprisonment whereas others impose death? Previous research exploring death penalty attitudes has primarily focused on individual and cultural factors. Adopting a functional perspective, we propose that environmental features may also shape our punishment strategies. Individuals are attuned to the availability of resources within their environments. Due to heightened concerns with the costliness of repeated offending, we hypothesize that individuals tend towards elimination-focused punishments during times of perceived scarcity. Using global and United States data sets (studies 1 and 2), we find that indicators of resource scarcity predict the presence of capital punishment. In two experiments (studies 3 and 4), we find that activating concerns about scarcity causes people to increase their endorsement for capital punishment, and this effect is statistically mediated by a reduced willingness to risk repeated offenses. Perceived resource scarcity shapes our punishment preferences, with important policy implications.