In order to locate source signal more accurately in authorized frequency bands, a novel primary user localization algorithm based on compressive sensing (PU-CSL) in cognitive radio networks (CRNs) is proposed in this paper. In comparison to existing centroid locating algorithms, PU-CSL shows higher locating accuracy for integrally exploring correlation between source signal and secondary users (SUs). Energy detection is first adopted for collecting the energy fingerprint of source signal at each SU, then degree of correlation between source signal and SUs is reconstructed based on compressive sensing (CS), which determines weights of centroid coordinates. A weighted centroid scheme is finally utilized to estimate source position. Simulation results show that PU-CSL has smaller maximum error of positioning and root-mean-square error. Moreover, the proposed PU-CSL algorithm possess excellent location accuracy and strong anti-noise performance.