An L-band 100 kW multi-beam klystron electron optics system was simulated using MAFIA, to which a MACRO program had been added. The effect of three-dimensional magnetic field on electron trajectories was analyzed. Among the center beam, inner beam and outer beam, with the increase of the distances between the main axis and the axes of the beams, the transverse magnetic field becomes stronger gradually, the wave amplitude of the electron beam becomes larger, and the laminar characteristics become worse. Eighteen beams were also simulated and the results showed that the beams scattered uniformly at the entrance of the collector.