The existence of a causal link between large earthquakes and volcanic unrest is widely accepted. Recent observations have also revealed counterintuitive negative responses of volcanoes to large earthquakes, including decreased gas emissions and subsidence in volcanic areas. In order to explore the mechanisms that could simultaneously explain both the positive and negative responses of volcanic activity to earthquakes, we here focus on the role played by topography. In the laboratory, we shook a volcanic edifice analogue, made of gel, previously injected with a buoyant fluid. We find that shaking triggers rapid migration of the buoyant fluid upward, downward, or laterally, depending on the fluid’s buoyancy and storage depth; bubbly fluids stored at shallow depth ascend, while low-buoyancy fluids descend or migrate laterally. The migration of fluids induced by shaking is two orders of magnitude faster than without shaking. Downward or lateral fluid migration may decrease volcanic gas emissions and cause subsidence as a negative response, while upward migration is consistent both with an increase in volcanic activity and immediate unrest (deformation and seismicity) after large earthquakes. The fluid migration is more efficient when the oscillation frequency is close to the resonance frequency of the edifice. The resonance frequency for a 30-km-wide volcanic mountain range, such as those where subsidence was observed, is ∼0.07 Hz. Only large earthquakes are able to cause oscillation at such low frequencies.