  A new generation mechanism of the magnetic field in an inhomogeneous
collisionless plasma with a beam component is proposed. We show that even
though the current and charge neutralities are initially satisfied, the current
neutrality is eventually violated if there is an inhomogeneity, so that the
magnetic field is generated. By conducting ab initio two-dimensional
particle-in-cell simulations, we demonstrate that the magnetic field is
generated as expected. The new generation mechanism of the magnetic field can
play an important role in the current universe because cosmic rays can be
regarded as the beam component in the astrophysical plasma. We propose that the
first cosmic rays generate the magnetic field with a large scale at the
redshift of z ~ 20.
