Doubly-fed wind turbine (DFIG) is one of the mainstream models of current wind farms, which has the advantages of decoupling control of active power and reactive power. In this paper, each DIFG unit in the wind farm is regarded as a separate continuous reactive power source. The reactive power output of each DIFG unit is taken as the control variable, and the active power loss inside the doubly-fed wind farm is set as the objective function to establish the reactive power optimization model. In order to reduce the active power loss and stabilize the node voltage in the wind farms, the hybrid concept of adaptive weight and genetic algorithm is introduced on the basis of basic particle swarm optimization (PSO) algorithm. A hybrid PSO algorithm is proposed and applied to solving reactive power optimization model in wind farm. Finally, taking a wind farm in North China as an example, the improved HPSO algorithm is used to solve the established reactive power optimization model in MATLAB software.Compared with the basic PSO algorithm and the linear decreasing weight PSO algorithm, the improved HPSO algorithm has faster convergence and better results, which verifies the correctness of the model and algorithm.