Abstract: A numerical simulation of the formation of plasma bunches in a long mirror machine under the gyromagnetic autoresonance was carried out in a magnetic field that increased with time. The process of the formation of plasma bunches with an energetic electronic component was studied as well as their time and space dynamics. The evolution of the energy spectra of the electron and ion components of the plasma was also studied. The analysis of the dependence of the efficiency of the trapping of electrons in the gyromagnetic autoresonance regime on experimental parameters was conducted. It was shown that a collective acceleration of the ion component of plasma bunches is possible. The obtained results are important for the understanding of the mechanisms of generation and confinement of plasma bunches with an energetic electron component in a long mirror machine. © 2020, Pleiades Publishing, Ltd.