Abstract Optimizing the design of semiconductor detector requires an electron track-structure code that can trace an incident electron motion with energies down to a few eV and simulate the production process of excited electrons in semiconductors. We therefore developed an Electron Track Structure mode applicable to ARbitrary Targets (ETSART) and implemented it into Particle and Heavy Ion Transport code System (PHITS). ETSART can simulate the electrons’ motion in arbitrary semiconductor materials using their bandgap energies. The accuracy of ETSART was validated by comparing the calculated electron path lengths in semiconductor materials with the corresponding data in the ICRU Report 37. Using ETSART, we also computed the mean energy required to produce an electron–hole pair (epsilon value) in various semiconductors and found that the epsilon value varies nonlinearly with the bandgap energy. Thus, ETSART can be useful for initial and mechanistic evaluations of electron–hole pair formation in new materials.