A Middle–Late Miocene andesitic arc named the Mohakatino Volcanic Centre is buried beneath younger sediments in the northern part of the Taranaki Basin, New Zealand’s primary oil production province. Volcanoes of the centre cover an area of about 3200 km2. An estimated 7000±3000 km3 of andesite were erupted from the centre and between 1000 to 2500 km3 of magma were intruded into the basement beneath the volcanic cones. The key element of the petroleum system altered by magmatism is the maturity of source rocks and the timing of expulsion, although volcanism also contributes to the formation of potential reservoirs and traps. In the northern Taranaki Basin, two periods of hydrocarbon expulsion occurred: following magmatism (14 Ma to about 8 Ma), and following renewed burial (since about 4 Ma). Thermal models indicate that Late Cretaceous terrestrial source rocks close to large magmatic intrusions became fully mature during magmatism. Overlying marine source rocks are modelled to still be generating and expelling hydrocarbons to the present day. Hence hydrocarbon expulsion and the charge history of this basin is partly governed by Miocene magmatism. Results are also relevant to many petroleum basins that contain similar andesitic arc volcanic rocks.