Marine heatwaves (MHWs) are prolonged extreme warm water events in the ocean, exerting devastating impacts on marine ecosystems. A comprehensive knowledge of physical processes controlling MHW life cycles is pivotal to improve MHW forecast capacity, yet it is still lacking. Here, we use a historical simulation from a global eddy-resolving climate model with improved representation of MHWs, and show that heat flux convergence by oceanic mesoscale eddies acts as a dominant driver of MHW life cycles over most parts of the global ocean. In particular, the mesoscale eddies make an important contribution to growth and decay of MHWs, whose characteristic spatial scale is comparable or even larger than that of mesoscale eddies. The effect of mesoscale eddies is spatially heterogeneous, becoming more dominant in the western boundary currents and their extensions, the Southern Ocean, as well as the eastern boundary upwelling systems. This study reveals the crucial role of mesoscale eddies in controlling the global MHW life cycles and highlights that using eddy-resolving ocean models is essential, albeit not necessarily fully sufficient, for accurate MHW forecasts.