Complete relativistic corrections of an effective Hamiltonian for a single-particle system in an external electromagnetic field and their unitary equivalent form up to the order of mα 8 are obtained. The derivation is based on two approaches applying Foldy–Wouthuysen (FW) transformation to the Dirac Hamiltonian for a particle in an external electromagnetic field. The results are consistent with the previous work at the mα 6 and mα 8 order correction [Phys. Rev. A 71 012503 (2005); Phys. Rev. A 100 012513 (2019)]. We also further consider the effect of anomalous magnetic moments, namely, the Dirac–Pauli equation, and obtain FW-Hamiltonians at the same order. The results obtained can be used for the subsequent calculation of relativistic and radiation effects in simple atomic and molecular systems.