About one quarter of the CO2 emitted to the atmosphere by human activities is absorbed annually by the ocean. All the processes that influence the oceanic uptake of CO2 are controlled by climate. Hence changes in climate (both natural and human-induced) are expected to alter the uptake of CO2 by the ocean. However, available information that constrains the direction, magnitude, or rapidity of the response of ocean CO2 to changes in climate is limited. We present an analysis of oceanic CO2 trends for 1981 to 2007 from data and a model. Our analysis suggests that the global ocean responded to recent changes in climate by outgassing some preindustrial carbon, in part compensating the oceanic uptake of anthropogenic CO2. Using a model, we estimate that climate change and variability reduced the CO2 uptake by 12% compared to a simulation where constant climate is imposed, and offset 63% of the trend in response to increasing atmospheric CO2 alone. The response is caused by changes in wind patterns and ocean warming, with important nonlinear effects that amplify the response of oceanic CO2 to changes in climate by > 30%.