With the increasing penetration of renewable energy, virtual power plants reduce the impact on the power grid by integrating massive distributed resources for unified management. However, the optimal scheduling of a large number of distributed resources in virtual power plants has become a new problem in recent years. Therefore, aiming at the real-time optimal scheduling problem in the optimal scheduling of virtual power plant, this letter regards the virtual power plant as a multi-agent system, and proposes a novel real-time active power dispatch scheme of virtual power plant based on distributed model predictive control, so that each agent can not only calculate its own optimization function relatively independently, but also fully refer to the neighbor information. Simulation results show the feasibility and effectiveness of the proposed method.