We develop a theory linking “misallocation,” i.e., dispersion in marginal products of capital (MPK), to macroeconomic risk. Dispersion in MPK depends on (i) heterogeneity in firm-level risk premia and (ii) the price of risk, and thus is countercyclical. We document strong empirical support for these predictions. Stock market-based measures of risk premia imply that risk considerations explain about 30% of observed MPK dispersion among US firms and rationalize a large persistent component in firm-level MPK. Risk-based MPK dispersion, although not prima facie inefficient, lowers long-run aggregate productivity by as much as 6%, suggesting large “productivity costs” of business cycles.