We present a new nitrogen isotope model incorporated into the three-dimensional ocean component of a global Earth system climate model designed for millennial timescale simulations. The model includes prognostic tracers for the two stable nitrogen isotopes, 14N and 15N, in the nitrate (NO3−), phytoplankton, zooplankton, and detritus variables of the marine ecosystem model. The isotope effects of algal NO3− uptake, nitrogen fixation, water column denitrification, and zooplankton excretion are considered as well as the removal of NO3− by sedimentary denitrification. A global database of δ15NO3− observations is compiled from previous studies and compared to the model results on a regional basis where sufficient observations exist. The model is able to qualitatively and quantitatively reproduce many of the observed patterns such as high subsurface values in water column denitrification zones and the meridional and vertical gradients in the Southern Ocean. The observed pronounced subsurface minimum in the Atlantic is underestimated by the model presumably owing to too little simulated nitrogen fixation there. Sensitivity experiments reveal that algal NO3− uptake, nitrogen fixation, and water column denitrification have the strongest effects on the simulated distribution of nitrogen isotopes, whereas the effect from zooplankton excretion is weaker. Both water column and sedimentary denitrification also have important indirect effects on the nitrogen isotope distribution by reducing the fixed nitrogen inventory, which creates an ecological niche for nitrogen fixers and, thus, stimulates additional N2 fixation in the model. Important model deficiencies are identified, and strategies for future improvement and possibilities for model application are outlined.