Target detection is an important task for remote sensing images, while it is still difficult to obtain satisfied performance when some images possess complex and confusion spectrum information, for example, the high similarity between target and background spectrum under some circumstance. Traditional detectors always detect target without any preprocessing procedure, which can increase the difference between target spectrum and background spectrum. Therefore, these methods could not discriminate the target from complex or similar background effectively. In this paper, sparse representation was introduced to weight each pixel for further increasing the difference between target and background spectrum. According to sparse reconstruction error matrix of pixels on images, adaptive weights will be assigned to each pixel for improving the difference between target and background spectrum. Furthermore, the sparse weighted-based constrained energy minimization method only needs to construct target dictionary, which is easier to acquire. Then, according to more distinct spectrum characteristic, the detectors can distinguish target from background more effectively and efficiency. Comparing with state-of-the-arts of target detection on remote sensing images, the proposed method can obtain more sensitive and accurate detection performance. In addition, the method is more robust to complex background than the other methods.