An 80 keV/0.2 A electron target with a low electron temperature ( \(\mathrm {K_BT_{\perp }<5\,meV}\) , \(\mathrm {K_BT_{\parallel }<0.1\, meV}\) ) has been proposed for the spectrometer ring (SRing) of high-intensity heavy-ion accelerator facility (HIAF). In order to understand the variation of electron beam temperature during the beam transport from the gun to the ion electron interaction section, a numerical code named E-Beam incorporating modules for the motion of charged particles in a three-dimensional electromagnetic field and molecular dynamics was developed. With this code, various processes that may influence the electron beam temperature, such as adiabatic acceleration, adiabatic magnetic field expansion and beam passage through the toroid, were simulated. Based on the simulation results, basic parameters and field distribution of the electron target are optimized to effectively control the transverse electron beam temperature below \(\mathrm {5\, meV}\) , while also achieving a longitudinal temperature below \(\mathrm {20\,\mu eV}\) . This paper provides a comprehensive description of the simulation method and the simulation results.