To address the coordinated distribution of motor braking and friction braking for the regenerative braking system, a cooperative braking algorithm based on nonlinear model predictive control (NMPC) is proposed, with braking energy recovery power, tire slip rate, and motor torque variation as the optimization objectives, and online optimization of the coordinated distribution of motor braking and friction braking. Using the offline model built in Matlab/Simulink, the cooperative braking algorithm is tested for energy efficiency and braking safety. The results show that when based on World Light Vehicle Test Cycle (WLTC), the energy recovery rate can reach 30.4%, and with a single high braking intensity, the braking safety can still be ensured.