We provide coastal ocean Net Ecosystem Production (NEP) and air-sea CO2 fluxes originating from HAMOCC model realizations for pre-industrial and historical (1800-2015) conditions on a TP04 grid (around 4 degrees spatial resolution), in which the model was altered to offer an improved representation of the coastal ocean. This was done in the model by explicitely considering riverine fluxes of biogeochemical compounds to the ocean and ameliorating dynamics of organic matter in the coastal ocean. The data of the model output covers biogeochemical metrics (NEP and air-sea CO2 flux) from the last 100 years of a 2000-year pre-industrial simulations (pi), as well as the air-sea CO2 flux of a historical simulation over 1800-2015 (hist), in which atmospheric CO2 levels were augmented progressively to present-day conditions.