The aim of this study was to assess the association between state firearm legislation and law enforcement–related deaths (LEDs) and its modification by race. We used secondary data from an ecological cohort of 16 states (2010 to 2016), using the National Violent Death Reporting System (NVDRS), the State Firearm Law Database and additional public sources. Poisson regression with generalised estimating equations and inverse probability of exposure weights to account for time-varying confounding were used to quantify the association. LEDs were also disaggregated by race (Black vs non-Black). A total of 1593 LEDs took place during the 6-year study period. After adjusting for confounders, the IRR among non-Blacks was 0.48 (95% CI 0.26 to 0.89) and 1.53 (95% CI 0.93 to 2.54) among Blacks. Our findings highlight the fact that increased firearm provisions may decrease rates of LED among non-Black American individuals—an association not observed among Black Americans.