Atmospheric concentrations of methane (CH4) and nitrous oxide (N2O) have increased over the last 150 years because of human activity. Soils are important sources and sinks of both potent greenhouse gases where their production and consumption are largely regulated by biological processes. Climate change could alter these processes thereby affecting both rate and direction of their exchange with the atmosphere. We examined how a rise in atmospheric CO2 and temperature affected CH4 and N2O fluxes in a well-drained upland soil (volumetric water content ranging between 6% and 23%) in a semiarid grassland during five growing seasons. We hypothesized that responses of CH4 and N2O fluxes to elevated CO2 and warming would be driven primarily by treatment effects on soil moisture. Previously we showed that elevated CO2 increased and warming decreased soil moisture in this grassland. We therefore expected that elevated CO2 and warming would have opposing effects on CH4 and N2O fluxes. Methane was taken up throughout the growing season in all 5 years. A bell-shaped relationship was observed with soil moisture with highest CH4 uptake at intermediate soil moisture. Both N2O emission and uptake occurred at our site with some years showing cumulative N2O emission and other years showing cumulative N2O uptake. Nitrous oxide exchange switched from net uptake to net emission with increasing soil moisture. In contrast to our hypothesis, both elevated CO2 and warming reduced the sink of CH4 and N2O expressed in CO2 equivalents (across 5 years by 7% and 11% for elevated CO2 and warming respectively) suggesting that soil moisture changes were not solely responsible for this reduction. We conclude that in a future climate this semiarid grassland may become a smaller sink for atmospheric CH4 and N2O expressed in CO2-equivalents.