Many temperate and boreal forests are subject to insect epidemics. In the eastern US, over 41 million meters squared of tree basal area are thought to be at risk of gypsy moth defoliation. However, the decadal-to-century scale implications of defoliation events for ecosystem carbon dynamics are not well understood. In this study, the effects of defoliation intensity, periodicity and spatial pattern on the carbon cycle are investigated in a set of idealized model simulations.A mechanistic terrestrial biosphere model, ecosystem demography model 2, is driven with observations from a xeric oak-pine forest located in the New Jersey Pine Barrens. Simulations indicate that net ecosystem productivity (equal to photosynthesis minus respiration) decreases linearly with increasing defoliation intensity. However, because of interactions between defoliation and drought effects, aboveground biomass exhibits a nonlinear decrease with increasing defoliation intensity. The ecosystem responds strongly with both reduced productivity and biomass loss when defoliation periodicity varies from 5 to 15 yr, but exhibits a relatively weak response when defoliation periodicity varies from 15 to 60 yr. Simulations of spatially heterogeneous defoliation resulted in markedly smaller carbon stocks than simulations with spatially homogeneous defoliation. These results show that gypsy moth defoliation has a large effect on oak-pine forest biomass dynamics, functioning and its capacity to act as a carbon sink.