Brachiopods dominated the seafloor as a primary member of the Paleozoic fauna. Despite the devastating effects of the end-Permian extinction, the group recovered during the early Mesozoic only to gradually decline from the Jurassic to today. This decline likely had multiple causes, including increased predation and bioturbation-driven substrate disruption, but the role of changing substrate is not well understood. Given the importance of substrate for extant brachiopod habitat, we documented Mesozoic-Cenozoic lithologic preferences and morphological changes to assess how decreasing firm-substrate habitat may have contributed to the brachiopod decline. Compared with bivalves, Mesozoic brachiopods occurred more frequently and were disproportionately abundant in carbonate lithologies. Although patterns in glauconitic or ferruginous sediments are equivocal, brachiopods became more abundant in coarser-grained carbonates and less abundant in fine-grained siliciclastics. During the Jurassic, brachiopod species rarely had abraded beaks but tended to be more convex with a high beak, potentially consistent with a non-analogue lifestyle resting on the seafloor. However, those highly convex morphotypes largely disappeared by the Cenozoic, when more terebratulides had abraded beaks, suggesting closer attachment to hard substrates. Rhynchonellides disproportionately declined to become a minor component of Cenozoic faunas, perhaps because of less pronounced morphological shifts. Trends in lithologic preferences and morphology are consistent with bioturbation-driven substrate disruption, with brachiopods initially using firmer carbonate sediments as refugia before adapting to live primarily attached to hard surfaces. This progressive habitat restriction likely played a role in the final brachiopod decline, as bioturbating ecosystem engineers transformed benthic habitats in the Mesozoic and Cenozoic.