  We investigate the surface nitrogen content of the six magnetic O stars known
to date as well as of the early B-type star tau Sco. We compare these
abundances to predictions of evolutionary models to isolate the effects of
magnetic field on the transport of elements in stellar interiors. We conduct a
quantitative spectroscopic analysis of the sample stars with state-of-the-art
atmosphere models. We rely on high signal-to-noise ratio, high resolution
optical spectra obtained with ESPADONS at CFHT and NARVAL at TBL. Atmosphere
models and synthetic spectra are computed with the code CMFGEN. Values of N/H
together with their uncertainties are determined and compared to predictions of
evolutionary models. We find that the magnetic stars can be divided into two
groups: one with stars displaying no N enrichment (one object); and one with
stars most likely showing extra N enrichment (5 objects). For one star (Theta1
Ori C) no robust conclusion can be drawn due to its young age. The star with no
N enrichment is the one with the weakest magnetic field, possibly of dynamo
origin. It might be a star having experienced strong magnetic braking under the
condition of solid body rotation, but its rotational velocity is still
relatively large. The five stars with high N content were probably slow
rotators on the zero age main sequence, but they have surface N/H typical of
normal O stars, indicating that the presence of a (probably fossil) magnetic
field leads to extra enrichment. These stars may have a strong differential
rotation inducing shear mixing. Our results should be viewed as a basis on
which new theoretical simulations can rely to better understand the effect of
magnetism on the evolution of massive stars.
