In 2021, Wenzhou adopted measures to restrict the use of electricity, and the shortage of electricity became an important factor affecting the production and life of Wenzhou. Nanxi River is one of the main rivers in Wenzhou City, and its water resources are very rich. According to the statistics of the water conservancy planning of the Nanxi River basin, there are 96 hydropower stations in the Nanxi River basin, with a total installed capacity of 152100 kW, accounting for 57% of the installed capacity. The development and utilization of the Nanxi River water resources can alleviate the power shortage in Wenzhou power grid to a certain extent. The development and utilization of hydropower are closely related to the runoff of the basin. The river runoff is mainly determined by rainfall, underlying surface and upstream inflow. River runoff is affected by many factors in the process of formation, so it is difficult to improve its prediction accuracy. In order to improve the prediction accuracy of the runoff of the main stream of the Nanxi River, this paper introduces the runoff prediction model of particle swarm optimization adaptive fuzzy inference system (PSO-ANFIS). ANFIS model has the advantages of applying fuzzy rules and the nonlinear approximation ability of neural network, but the antecedent parameters of ANFIS model are prone to fall into local optimization. In order to improve the generalization ability of the antecedent parameters of ANFIS model, the PSO algorithm of global optimization is introduced to optimize the antecedent parameters of ANFIS. Through the application of the example, it is found that the decision coefficient of PSO-ANFIS model in the simulation stage is 0.987, and the decision coefficient in the prediction stage is 0.856. This model can be applied in the annual runoff forecast. Through comparison with ANFIS model, it is found that PSO-ANFIS model has better prediction effect.