  We propose a mechanism generating primordial magnetic fields after the
$e^+e^-$ annihilations. Our mechanism involves an ultra-light axion-like
particle (ALP) which constitutes the dark matter, and a dark $U(1)_X$ gauge
boson introduced to bypass the obstacle placed by the conductivity of cosmic
plasma. In our scheme, a coherently oscillating ALP amplifies the dark photon
field, and part of the amplified dark photon field is concurrently converted to
the ordinary magnetic field through the ALP-induced magnetic mixing. For the
relevant ALP mass range $10^{-21} {\rm eV}\lesssim m_\phi\lesssim 10^{-17}{\rm
eV}$, our mechanism can generate $B\sim 10^{-24} \,{\rm G} \,(m_\phi/10^{-17}
{\rm eV})^{5/4}$ with a coherent length $\lambda \sim (m_\phi/10^{-17} {\rm
eV})^{-1/2}$ kpc, which is large enough to provide a seed of the galactic
magnetic fields. The mechanism also predicts a dark $U(1)_X$ electromagnetic
field $E_X \sim B_X\sim 80\,{\rm nG}\, (m_\phi/10^{-17}{\rm eV})^{-1/4}$, which
can result in interesting astrophysical/cosmological phenomena by inducing the
mixings between the ALP, ordinary photon, and dark photon states.
