There are two kinds of relationships between magmatism and the generation of hydrocarbons from source rocks in petroliferous basins, namely: (1) simultaneous magmatism and hydrocarbon generation, and (2) magmatism that occurs after hydrocarbon generation. Although the influence of magmatism on hydrocarbon source rocks has been extensively studied, there has not been a systematic comparison between these two relationships and their influences on hydrocarbon generation. Here, we present an overview of the influence of magmatism on hydrocarbon generation based on the results of simulation experiments. These experiments indicate that the two relationships outlined above have different influences on the generation of hydrocarbons. Magmatism that occurred after hydrocarbon generation contributed deeply sourced hydrogen gas that improved liquid hydrocarbon productivity between the mature and overmature stages of maturation, increasing liquid hydrocarbon productivity to as much as 451.59% in the case of simulation temperatures of up to 450 C during modelling where no hydrogen gas was added. This relationship also increased the gaseous hydrocarbon generation ratio at temperatures up to 450 C, owing to the cracking of initially generated liquid hydrocarbons and the cracking of kerogen. Our simulation experiments suggest that gaseous hydrocarbons dominate total