  We study the generation of the chiral charge during axion inflation where the
pseudoscalar inflaton field $\phi$ couples axially to the electromagnetic field
through the term $(\beta/M_p)\phi\,\boldsymbol{E}\cdot\boldsymbol{B}$ with
dimensionless coupling constant $\beta$. To describe the evolution of
electromagnetic field and determine
$\langle\boldsymbol{E}\cdot\boldsymbol{B}\rangle$ sourcing the chiral asymmetry
during inflation due to the chiral anomaly, we employ the gradient expansion
formalism. It operates with a set of vacuum expectation values of bilinear
electromagnetic functions and allows us to take into account the backreaction
of generated fields on the inflaton evolution as well as the Schwinger
production of charged fermions. In addition, we include the chiral magnetic
effect contribution to the electric current $\boldsymbol{j}_{\rm
CME}=e^{2}/(2\pi^2)\mu_{5}\boldsymbol{B}$, where $\mu_5$ is the chiral chemical
potential which quantifies the chiral charge production. Solving a set of
equations for the inflaton field, scale factor, quadratic functions of the
electromagnetic field, and the chiral charge density (chiral chemical
potential), we find that the chirality production is quite efficient leading to
the generation of a large chemical potential at the end of axion inflation.
