We use comprehensive patient-level discharge data to study the effect of Medicaid on the use of hospital services. Our analysis relies on cross-state variation in the Affordable Care Act's Medicaid expansion, along with within-state variation across zip codes in exposure to the expansion. We find that the Medicaid expansion increased Medicaid visits and decreased uninsured visits. The net effect is positive for all visits, suggesting that those who gain coverage through Medicaid consume more hospital services than they would if they remained uninsured. The increase in emergency department visits is largely accounted for by "deferrable" medical conditions. Those who gained coverage under the Medicaid expansion appear to be those who had relatively high need for hospital services, suggesting that the expansion was well targeted. Lastly, we find significant heterogeneity across Medicaid expansion states in the effects of the expansion, with some states experiencing a large increase in total utilization and other states experiencing little change. Increases in hospital utilization were larger in Medicaid expansion states that had more residents gaining coverage and lower pre-expansion levels of uncompensated hospital care costs.