In order to improve the localization accuracy and anti-noise performance of wireless sensor network based on compressive sensing, a multi-target localization algorithm based on compressive sensing reconstruction of binary whale optimization algorithm in wireless sensor network is proposed. Firstly, the continuous whale optimization algorithm was discretized in the binary space, and the characteristics of whale preying strategy were retained. Then, the binary whale optimization algorithm was used to reconstruct the compressed sensing signal, and finally the multi-target positioning under the wireless sensor network was realized. The comparison of experimental results shows that compared with the traditional compressive sensing reconstruction algorithm, when the target number is 8 and the SNR is 5dB, the average positioning error of this algorithm is controlled within 1.25m and has good anti-noise performance. In addition, the counting performance and positioning performance are better than the greedy matching tracking algorithm and the traditional L1 norm solving algorithm.