We study the generation of an electric current, along the external magnetic field, of fermions, interacting by parity violating electroweak forces with background matter. First, we discuss the situation of massive particles with nonzero anomalous magnetic moments. We show that the induced current is vanishing for such particles in the state of equilibrium. Then, the case of massless fermions is studied. We demonstrate that the contribution of the electroweak interaction is washed out from the expression for the current, which turns out to coincide with the prediction of the chiral magnetic effect. Our results are compared with findings of other authors. *