We explored the association between the use of a hospital-based food pantry and subsequent emergency department (ED) utilization among Medicaid patients with diabetes in a large safety-net health system. Leveraging 2015-2019 electronic health record data, we used a staggered difference-in-differences approach to measure changes in ED use before vs after food pantry use. Food pantry use was associated with a 7.3 percentage point decrease per patient per quarter (95% confidence interval, -13.8 to -0.8) in the probability of subsequent ED utilization ( P = .03). Addressing food insecurity through hospital-based food pantries may be one mechanism for reducing ED use among low-income patients with diabetes.