A slowdown in the rate of surface warming in the early 2000s led to renewed interest in the redistribution of ocean heat content (OHC) and its relationship with internal climate variability. We use the Community Earth System Model version 1 to study the relationship between OHC and the interdecadal Pacific oscillation (IPO), a major mode of decadal sea surface temperature variability in the Pacific Ocean. By comparing the relative contributions of surface heat flux and ocean dynamics to changes in OHC for different phases of the IPO, we try to identify the underlying physical processes involved. Our results suggest that during IPO phase transitions, changes of 0–300-m OHC across the northern extratropical Pacific are positively contributed by both surface heat flux and oceanic heat transport. By contrast, oceanic heat transport appears to drive the OHC changes in equatorial Pacific whereas surface heat flux acts as a damping term. During a positive IPO phase, weakened wind-driven circulation acts to increase the OHC in the equatorial Pacific while the enhanced evaporation acts to damp OHC anomalies. In the Kuroshio–Oyashio Extension region, a dipole anomaly of zonal heat advection amplifies an OHC dipole anomaly that moves eastward, while strong turbulent heat fluxes act to dampen this OHC anomaly. In the northern subtropical Pacific, both the wind-driven evaporation change and the change of zonal heat advection along Kuroshio Extension contribute to the OHC change during phase transition. For the northern subpolar Pacific, both surface heat flux and enhanced meridional advection contribute to the positive OHC anomalies during the positive IPO phase.