Electric vehicles (EVs) are regarded as the clean transportation due to their wide promising application in the energy conservation and vehicle safety. However, how to allocate the battery energy to four individual in-wheel motors is a challenging job. In this paper, a dynamic energy management strategy of the EV is proposed to optimize the battery energy consumption and to reduce the tire slip loss simultaneously. Basically, nonlinear model predictive control is utilized to identify the tire dynamics and vehicle load. Then, the multi-objective optimization problem with the nonlinear constraints is addressed with the modified particle swarm optimization (MPSO) algorithm in which the inertia weight of particle velocity and the acceleration coefficient are further altered for the real-time calculation. Furthermore, the modification of the global optimal position of the population can effectively avoid the local optima dilemma. The numerical test is implemented under US06 and WLTC03 maneuvers to validate the superiority of the proposed energy strategy. The results demonstrate that the proposed dynamic energy strategy can automatically allocate the torque requirement according to the dynamic load and put more weights on the front wheels in the braking condition. Compared with the typical rule-based strategy, the proposed strategy can conserve 12 ∼ 17% of the battery energy and reduce approximate13% of tire slip loss. Moreover, the modified PSO algorithm can reduce the computational time by 55% which further validates its application value in the real-time energy management of EVs.