We use a three-dimensional global magnetohydrodynamic (MHD) simulation code to examine the energy flow from the solar wind to the magnetosphere. We simulate a major magnetic storm, which occurred on 6–7 April 2000. During this disturbed period the energy input to the magnetosphere was highly enhanced. For the energy transfer calculation a method for identifying the magnetopause surface from the simulation is developed. We calculate the total energy flux component normal to the magnetopause surface, thus giving the energy flux transferred from the solar wind to the magnetosphere. With this method we identify the locations on the magnetopause surface where significant energy transfer takes place during the storm evolution. During the main phase the energy is transferred from the plane parallel and antiparallel to the interplanetary magnetic field (IMF) clock angle Sunward of XGSE > −10 RE. During the recovery phase most of the energy is transferred in the low-latitude equatorial sectors Sunward of the dawn-dusk terminator. We discuss the possible explanations to the observed energy transfer locations. We also compare the time evolution of the total transferred energy to the time evolution of the empirical ϵ parameter calculated from the solar wind parameters. During the main phase the total transferred energy in the simulation is well correlated with ϵ, although it is about four times larger. During the recovery phase the total transferred energy and ϵ are not well correlated, and their ratio is much larger than during the main phase. Finally, we discuss limitations of the developed method, which is based on calculating fluxes through surfaces using surface integrals.