For the coupling problem of longitudinal control and lateral control of vehicles, a two-dimensional (2-D) car-following control strategy for an electric vehicle is proposed in this paper. First, a 2-D car-following model for longitudinal following and lateral lane keeping is established. Then, a 2-D car-following control strategy is designed, and the longitudinal following control and lateral lane keeping control are integrated into one model predictive control (MPC) framework. The 2-D car-following strategy can realize the multi-objective coordinated optimization for longitudinal control and lateral control during the 2-D car-following process, and the multiple objectives are: safety, tracking, comfort, lane keeping, lateral stability and economy. In addition, the economy is important for electric vehicles. The weight matrix of the objective function in the MPC framework is symmetric, and the weight coefficients for the weight matrix have a great influence on the control. The contribution of this paper is: in order to adapt to different dynamic processes of lane keeping, the weight coefficients in the MPC framework are optimized in real-time based on the deep Q network (DQN) algorithm. Finally, to verify the 2-D car-following control strategy, a comparison strategy and two experimental scenarios are set, and simulation experiments are carried out. In scenario 1, compared with the comparison strategy, the lane keeping, lateral stability and economy of the proposed strategy are improved by 37.21%, 17.57% and 9.26%, respectively. In scenario 2, compared with the comparison strategy, the lane keeping, lateral stability and economy of the proposed strategy are improved by 36.45%, 16.66% and 18.52%, respectively. Therefore, compared with the comparison strategy, the 2-D car-following control strategy can have better lane keeping, lateral stability and economy on the premise of ensuring other performances during the 2-D car-following process.