Scleractinian corals have two fundamentally different life strategies, which can be inferred from morphological criteria in fossil material. In the non-photosymbiotic group nutrition comes exclusively from heterotrophic feeding, whereas the photosymbiotic group achieves a good part of its nutrition from algae hosted in the coral’s tissue. These ecologic differences arose early in the evolutionary history of corals but with repeated evolutionary losses and presumably also gains of symbiosis since then. We assessed the biodiversity dynamics and environmental occupancy of both ecologic groups to identify times when the evolutionary losses of symbiosis as inferred from molecular analyses might have occurred and if these can be linked to environmental change. Two episodes are likely: The first was in the mid-Cretaceous when non-symbiotic corals experienced an origination pulse and started to become more common in deeper, non-reef habitats and on siliciclastic substrates initiating a long-term offshore trend in occupancy. The second was around the Cretaceous/Paleogene boundary with another origination pulse and increased occupancy of deep-water settings in the non-symbiotic group. Environmental factors such as rapid global warming associated with mid-Cretaceous anoxic events and increased nutrient concentrations in Late Cretaceous–Cenozoic deeper waters are plausible mechanisms for the shift. Turnover rates and durations are not significantly different between the two ecologic groups when compared over the entire history of scleractinians. However, the deep-water shift of non-symbiotic corals was accompanied by reduced extinction rates, supporting the view that environmental occupancy is a prominent driver of evolutionary rates.