Despite well-studied associations of state firearm laws with lower state- and county-level firearm homicide, there is a shortage of studies investigating differences in the effects of distinct state firearm law categories on various cities within the same state using identical methods. We examined associations of 5 categories of state firearm laws-pertaining to buyers, dealers, domestic violence, gun type/trafficking, and possession-with city-level firearm homicide, and then tested differential associations by city characteristics. City-level panel data on firearm homicide casesof 78 majorcities from 2010 to 2020 wasassessed from the Centers for Disease Control and Prevention's National Vital Statistics System. We modeled log-transformed firearm homicide rates as a function of firearm law scores, city, state, and year fixed effects, along with time-varying city-level confounders. We considered effect measure modification by poverty, unemployment, vacant housing, and income inequality. A one z-score increase in state gun type/trafficking, possession, and dealer law scores was associated with 25% (95% confidence interval [CI]:-0.37,-0.1), 19% (95% CI:-0.29,-0.07), and 17% (95% CI:-0.28, -0.4) lower firearm homicide rates, respectively. Protective associations were less pronounced in cities with high unemployment and high housing vacancy, but more pronounced in cities with high income inequality. In large US cities, state-level gun type/trafficking, possession, and dealer laws were associated with lower firearm homicide rates, but buyers and domestic violence laws were not. State firearm laws may have differential effects on firearm homicides based on city characteristics, and city-wide policies to enhance socioeconomic drivers may add benefits of firearm laws.