Aiming at the problems of poor coordination effect and low positioning accuracy of unmanned aerial vehicle (UAV) formation cooperative navigation in complex environments, an adaptive time-varying factor graph framework UAV formation cooperative navigation algorithm is proposed. The proposed algorithm uses the factor graph to describe the relationship between the navigation state of the UAV fleet and its own measurement information as well as the relative navigation information, and detects the relative navigation information at each moment by the double-threshold detection method to update the factor graph model at the current moment. And the robust estimation is combined with the factor graph, and the weight function measurements are used in the construction of the factor nodes for adaptive adjustment to make the system highly robust. The simulation results show that the proposed method realises the effective fusion of airborne multi-source sensing information and relative navigation information, which effectively improves the UAV formation cooperative navigation accuracy.