The late Paleozoic ice age (LPIA) was characterized by persistently low diversity of marine invertebrates following a second-order mass extinction. Here, we used a data set of North American (paleotropical) fossil occurrences of brachiopod, bivalve, and coral genera from the Paleobiology Database, combined with lithologic data from Macrostrat, to demonstrate that low diversity was caused by the collapse of carbonate environments during the LPIA. After dividing the data by lithology, low diversity was evident only in carbonate environments, whereas diversity within siliciclastic environments actually increased during the LPIA, after a brief decline in the Serpukhovian (late Mississippian). Diversity patterns closely matched respective changes in the volume of carbonate and siliciclastic rocks. The contrasting patterns observed in the two environments suggest that habitat loss was a direct cause of changes in diversity, because other factors, such as temperature, would have affected genera in both environments. A causal relationship is also supported by the finding that diversity remained high in carbonate refugia (carbonate beds within majority-siliciclastic formations) until the Bashkirian, postdating the onset of icehouse conditions by ∼8 m.y. Our results provide a unifying, mechanistic explanation for the distinctive characteristics of the biotic impact, including its disproportionate effect on the tropical marine invertebrate fauna, prolonged recovery from extinction, low macroevolutionary rates during the recovery interval, and regional differences in its expression.