With the increasing contradiction between water resources supply and demand in large irrigation areas in northwest China, grain production security gradually faces a serious threat. The traditional optimal irrigation water distribution models are mainly based on the objective function to optimize the allocation of crop water requirement, but the parameters and constraints of the objective function are more complex, which makes it nearly impossible to achieve the global optimal water distribution. This paper took the Xijun irrigation area of Heihe River basin as an example, on the basis of the principle of “based on constant flow discharge to control sluice gate” to study. It is possible to propose a backtracking search algorithm (BSA) to optimize water distribution model of irrigation district. BSA aims to choose different groups of branch canals under the constant flow rate of the main canal to ensure all branch canals can satisfy irrigation requirements. The irrigation water distribution time diagram of the branch canals was solved by backtracking search method, and the skewness coefficient of the sluice gate control time point was further obtained. In addition, the results of vector evaluation genetic algorithm (VEGA) and particle swarm optimization (PSO) were used to compare with BSA, and the adaptability of BSA was evaluated by analyzing the canal system of Xiaohe station. This study showed that the irrigation water distribution time of BSA, VEGA and PSO was 12.70 days, 14.38 days and 15.50 days respectively, the minimum deviation coefficient of BSA valve opening time point was 0.093, so BSA water distribution model had obvious superiority and stability. Besides, Xidong canal system, the water utilization rate of 0.651, had zero abandoned water, while Xiaohe station, with a high water utilization rate, had serious abandoned water, so BSA was generally applicable to areas with a lower water utilization rate of canal system. Under the reasonable application conditions, using BSA to optimize water distribution in irrigation area is able to not only guarantee better irrigation time to meet the requirements of canal system irrigation system, but also maintain the relative stability of fluid transportation to achieve the purpose of irrigation water distribution optimization.