We analyze the implications of strategic interactions between two heterogeneous groups (i.e., young and old, men and women) in a macroeconomic–epidemiological framework. The interactions between groups determine the overall prevalence of a communicable disease, which in turn affects the level of economic activity. Individuals may lower their disease exposure by reducing their mobility, but since changing mobility patterns is costly, each group has an incentive to free ride negatively affecting the chances of disease containment at the aggregate level. By focusing on an early epidemic setting, we explicitly characterize the cooperative and noncooperative equilibria, determining how the inefficiency induced by noncooperation (i.e., failure to internalize epidemic externalities) depends both on economic and epidemiological parameters. We show that long-run eradication may be possible even in the absence of coordination, but coordination leads to a faster reduction in the number of infectives in finite time. Moreover, the inefficiency induced by noncooperation increases (decreases) with the factors increasing (decreasing) the pace of the disease spread.