  We propose the mean field dynamo model for the generation of strongest
magnetic fields, $B\sim 10^{15}\,{\rm G}$, in a neutron star (NS) accounting
for the chiral magnetic effect (CME) driven by the shock in a supernova (SN)
progenitor of that NS. The temperature jump at a narrow shock front, where an
initial magnetic field existing in inflowing matter rises sharply, is the
source of the CME that prevails significantly the erasure of the CME due to the
spin-flip through Coulomb collisions in plasma. The growth of the magnetic
field just behind the shock given by the instability term $\nabla\times (\alpha
{\bf B})$ in induction equation, stops after a successful SN explosion that
throws out the mantle of a protoneutron star. As a result, such an explosion
interrupts the transfer of strongly magnetized plasma from the shock onto NS
surface and leads to the saturation of the magnetic field. Assuming the rigid
protostar rotation, we employ the mean field dynamo, which is similar to the
$\alpha^2$-dynamo known in the standard magnetohydrodynamics (MHD). The novelty
of our model is that $\alpha^2$-dynamo is based on concepts of particle
physics, applied in MHD, rather than by a mirror asymmetry of convective
vortices in the rotating convection.
