The construction of a strong smart grid has promoted the development of distributed power grid technologies. DG grid-connecting has not only improved voltage quality, reduced active power losses, but also increased the flexibility, economy, and security of distribution network operations. In this paper, the reactive power optimization model is established with the minimum active power loss and the minimum voltage bias as the objective function. Aiming at the current reactive power optimization problem, there is still a lack of a method that can take into account both the efficiency of the solution and the optimality of the global search. A new heuristic algorithm, the Whale Optimization Algorithm (WOA), is applied to reactive power optimization scheduling and performed on IEEE-33 node systems with a largeos DGs accesses. Research shows that DG integration increases the stability of distribution networks, and WOA algorithm robustness and effectiveness in iteration times, search capabilities.