The Indoor positioning based on the ZigBee received signal strength index has attracted more and more researchers' attention and, due to its low cost, low hardware power consumption and easy implementation. However, because of multipath effects and shadow effects, traditional indoor positioning algorithms cannot obtain good positioning effects. In order to improve the accuracy of ZigBee indoor positioning, this paper proposes an indoor positioning algorithm of annealing algorithm (SA) and genetic algorithm (GA) optimized neural network (SAGA-BP), and the superiority of this algorithm is proved through simulation and experiment. First, establish the position relationship between the received signal strength indicator(RSSI) and the target position, and arrange the node network structure model to collect signals to establish a fingerprint database. Then use the mechanism of the annealing algorithm combined with the genetic algorithm to optimize the initial weight and initial threshold of the neural network algorithm, so that it can quickly jump out of the local optimal solution and achieve high-precision positioning. Experiments have proved the effectiveness of the positioning algorithm. Compared with BP and GA-BP algorithms, SAGA-BP positioning algorithm has an average error of 0.75m for RSSI signals after acquisition and processing, and an average error of BP positioning algorithm is 1.24m. The average error of GA-BP algorithm is 0.98m. Thus, the SAGA-BP algorithm has higher positioning accuracy.