A substantial fraction of workers are underemployed, i.e., employed in jobs for which they are overqualified, and that fraction—the underemployment rate—is higher in recessions. To explain these facts, we build a search model with an endogenous “ranking” mechanism, in which high-skill applicants are systematically hired over less-skilled competing applicants. Some high-skill workers become underemployed in order to escape the competition for high-skill jobs and find a job more rapidly at the expense of less-skilled workers. Quantitatively, the model can capture the key characteristics of underemployment, notably the fact that both the underemployment rate and the wage loss associated with becoming underemployed increase in recessions. (JEL E24, E32, J24, J64)