Due to the presence of non-line-of-sight (NLOS) obstacles, the localization accuracy in ultra-wideband (UWB) wireless indoor localization systems is typically substantially lower. To minimize the influence of these environmental factors and improve the accuracy of indoor wireless positioning, a novel fusion optimization algorithm is proposed in this paper, which combines the density-based spatial clustering algorithm with noise (DBSCAN) and particle swarm optimization (PSO) algorithm. The positioning error of this algorithm remains is stable within 3 cm in static positioning scenarios, and can achieve high accuracy in NLOS environments.