  In this paper, we study analytically the process of external generation and
subsequent free evolution of the lepton chiral asymmetry and helical magnetic
fields in the early hot universe. This process is known to be affected by the
Abelian anomaly of the electroweak gauge interactions. As a consequence, chiral
asymmetry in the fermion distribution generates magnetic fields of non-zero
helicity, and vice versa. We take into account the presence of thermal bath,
which serves as a seed for the development of instability in magnetic field in
the presence of externally generated lepton chiral asymmetry. The developed
helical magnetic field and lepton chiral asymmetry support each other,
considerably prolonging their mutual existence, in the process of `inverse
cascade' transferring magnetic-field power from small to large spatial scales.
For cosmologically interesting initial conditions, the chiral asymmetry and the
energy density of helical magnetic field are shown to evolve by scaling laws,
effectively depending on a single combined variable. In this case, the
late-time asymptotics of the conformal chiral chemical potential reproduces the
universal scaling law previously found in the literature for the system under
consideration. This regime is terminated at lower temperatures because of
scattering of electrons with chirality change, which exponentially washes out
chiral asymmetry. We derive an expression for the termination temperature as a
function of the chiral asymmetry and energy density of helical magnetic field.
