In most of the simulations of the extraction region of negative hydrogen ion sources, the single-aperture simulation is often adopted by researchers to study the plasma phenomenon due to its small simulation domain and short calculation time. However, due to the complex three-dimensional magnetic field structure in the extraction region of the negative hydrogen ion source, the single aperture often does not meet the periodicity. In this paper, the complex three-dimensional magnetic field topology is established. The magnetic field includes the magnetic filter field and the magnetic deflection field. The influence of the plasma sheath is taken into account. The electron extraction process in the multi-aperture structure of the extraction region of a negative hydrogen ion source is numerically calculated using the PIC method. Besides, the magnetic field structure is optimized. Ultimately, the electron beam uniformity near the plasma grid is improved effectively, which has certain guiding significance for engineering application.