Influence of the magnetic field on the energy of the spin polarization state of a two-electron system in two-dimensional quantum dots (QDs) is studied by using the method of few-body physics. As example, a numerical calculation is performed for a GaAs semiconductor QD to show the variations of the ground-state energy $E_0,$ the spin-singlet energy $E_1(A)$ and spin-triplet energy $E_1(S)$ of the first excited state and the energy difference (i.e. $\Delta E(A)$ and $\Delta E(S)$) between the first excited and ground states with the effective radius $R_0$ of the QD and the magnetic field $B.$ The results show that $E_0$ increases with increasing $B,$ but decreases with increasing $R_0;$ in the magnetic field, the spin-singlet energy $E_1(A)$ of the first excited state splits into two levels as $E_{1+1}(A)$ and $E_{1-1}(A),$ the spin-triplet energy $E_1(S)$ of the first excited state splits into two sets as $E_{1+1}(S)$ and $E_{1-1}(S),$ and each set consists of three "fine structures" which correspond to $M_S=1,0,-1,$ respectively; each energy level (set, energy difference) decreases with increasing $R_0,$ but there are great differences among the changes of them with $B$: $E_{1+1}(A),$ $E^{M_S}_{1+1}(S),$ $\Delta E_{1+1}(A),$ and $\Delta E^{M_S}_{1+1}(S)$ increase significantly with increasing $B,$ but the variations of $E_{1-1}(A),$ $E^{M_S}_{1-1}(S),$ $\Delta E_{1-1}(A),$ and $\Delta E^{M_S}_{1-1}(S)$ with B are relatively slow; the splitting degree of each energy level (set, energy difference) is proportional to the first power of the magnetic field $B.$