The temporal coincidence between large igneous provinces (LIPs) and mass extinctions has led many to pose a causal relationship between the two. However, there is still no consensus on a mechanistic model that explains how magmatism leads to the turnover of terrestrial and marine plants, invertebrates and vertebrates. Here we present a synthesis of ammonite biostratigraphy, isotopic data and high precision U-Pb zircon dates from the Triassic-Jurassic (T-J) and Pliensbachian-Toarcian (Pl-To) boundaries demonstrating that these biotic crises are both associated with rapid change from an initial cool period to greenhouse conditions. We explain these transitions as a result of changing gas species emitted during the progressive thermal erosion of cratonic lithosphere by plume activity or internal heating of the lithosphere. Our petrological model for LIP magmatism argues that initial gas emission was dominated by sulfur liberated from sulfide-bearing cratonic lithosphere before CO2 became the dominant gas. This model offers an explanation of why LIPs erupted through oceanic lithosphere are not associated with climatic and biotic crises comparable to LIPs emitted through cratonic lithosphere.