The electron injector system for a future mid-infrared free-electron laser (MIR FEL) and coherent terahertz (THz) radiation source at the Plasma and Beam Physics (PBP) Research Facility of Chiang Mai University (CMU) in Thailand will consists mainly of a thermionic cathode radio-frequency (RF) electron gun, an alpha magnet, a traveling-wave linear accelerator (linac) structure and two magnetic bunch compressor systems. The detailed study of all components in the injector system is very important for generation of high quality electron beam and radiation. This paper focuses on the alpha magnet, which is used as a magnetic bunch compressor and an energy filter before the beam being accelerated in a post-acceleration linac structure. We report its characteristics and the electron beam dynamics in its three-dimensional (3D) magnetic field distribution that was simulated with the program CST EM Studio 2016. The simulated alpha magnet’s fields are comparable with the measurement data. The beam dynamic simulations in 3D magnetic field were performed by using programs ASTRA and ELEGANT. The simulation results allow us to investigate the influence of the fringe field, the vertical focusing and the space charge effect in the alpha magnet. This is significantly important for electron beam manipulation in the injector system. The study outputs reveal that the proper injection angle in the practical beam operation to compensate the fringe field effect should be 42∘ that is 1.29∘ larger than the ideal injection angle. We also found that the ratio of the vertical focal length to the total path length in the alpha magnet is 0.544, which is independent on the magnetic field gradient. Moreover, the space charge force in the electron bunch leads to the rotation of transverse phase spaces while the beam traverses in the alpha magnet’s field. This effect has considerably small influence on the longitudinal phase space, especially for the beam with a bunch charge not exceeding 0.2 nC.