Anthropogenic global surface warming is proportional to cumulative carbon emissions1,2,3; this relationship is partly determined by the uptake and storage of heat and carbon by the ocean4. The rates and patterns of ocean heat and carbon storage are influenced by ocean transport, such as mixing and large-scale circulation5,6,7,8,9,10. However, existing climate models do not accurately capture the observed patterns of ocean warming, with a large spread in their projections of ocean circulation and ocean heat uptake8,11. Additionally, assessing the influence of ocean circulation changes (specifically, the redistribution of heat by resolved advection) on patterns of observed and simulated ocean warming remains a challenge. Here we establish a linear relationship between the heat and carbon uptake of the ocean in response to anthropogenic emissions. This relationship is determined mainly by intrinsic parameters of the Earth system—namely, the ocean carbon buffer capacity, the radiative forcing of carbon dioxide and the carbon inventory of the ocean. We use this relationship to reveal the effect of changes in ocean circulation from carbon dioxide forcing on patterns of ocean warming in both observations and global Earth system models from the Fifth Coupled Model Intercomparison Project (CMIP5). We show that historical patterns of ocean warming are shaped by ocean heat redistribution, which CMIP5 models simulate poorly. However, we find that projected patterns of heat storage are primarily dictated by the pre-industrial ocean circulation (and small changes in unresolved ocean processes)—that is, by the patterns of added heat owing to ocean uptake of excess atmospheric heat rather than ocean warming by circulation changes. Climate models show more skill in simulating ocean heat storage by the pre-industrial circulation compared to heat redistribution, indicating that warming patterns of the ocean may become more predictable as the climate warms.