The causes of mass extinctions and the nature of biological selectivity during extinction events remain central questions in palaeobiology. Although many different environmental perturbations have been invoked as extinction mechanisms, it has long been recognized that fluctuations in sea level coincide with many episodes of biotic turnover. Recent work supports the hypothesis that changes in the areas of epicontinental seas have influenced the macroevolution of marine animals, but the extent to which differential environmental turnover has contributed to extinction selectivity remains unknown. Here I use a new compilation of the temporal durations of sedimentary rock packages to show that carbonate and terrigenous clastic marine shelf environments have different spatio-temporal dynamics and that these dynamics predict patterns of genus-level extinction, extinction selectivity and diversity among Sepkoski's Palaeozoic and modern evolutionary faunae. These results do not preclude a role for biological interactions or unusual physical events as drivers of macroevolution, but they do suggest that the turnover of marine shelf habitats and correlated environmental changes have been consistent determinants of extinction, extinction selectivity and the shifting composition of the marine biota during the Phanerozoic eon.