The macroeconomic effects of the COVID-19 pandemic were most severe for emerging market economies, representing the middle of the world income distribution. This paper provides a quantitative economic theory for why emerging markets fared worse, on average, relative to advanced economies and low-income countries. To do so we adapt a workhorse incomplete-markets macro model to include epidemiological dynamics alongside key economic and demographic characteristics that distinguish countries of different income levels. We focus in particular on differences in lockdown stringency, public insurance programs, age distributions, healthcare capacity, and the sectoral composition of employment. The calibrated model correctly predicts the larger output losses and greater fatalities in emerging market economies, matching the data. Quantitatively, emerging markets fared especially poorly due to their high employment share in occupations requiring social interactions and their low level of pubic transfers, which leads economically vulnerable households to continue working in the market rather than sheltering at home. Low-income countries fared relatively better due mainly to their younger populations, whom are less susceptible to disease, and larger agricultural sectors, which require fewer social interactions.