Target detection is a crucial problem for the analysis of hyperspectral remote sensing image. Sparse representation-based methods have shown considerable potential in hyperspectral target detection. In a hyperspectral image (HSI), the sparse representation with respect to a certain pixel means the pixel can be sparsely represented by the linear combination of data vectors from the data dictionary. When applied to target detection, a training dictionary needs to be constructed, consisting of both target and background samples in the same feature space. Then the test pixels can be sparsely represented through the decomposition over the constructed dictionary. Sparse representation is considered to preserve the main information of most pixels in HSI target detection. However, some background pixels may possess spectra similar to the target pixels’ spectra, which may cause false detection. Therefore, more constraints are needed to smooth these pixels. We propose a local similarity constraint-based sparse algorithm to deal with this problem. Based on the assumption that pixels have both spectral and spatial similarity should have similar sparse representation, a local similarity constraint term is incorporated into the sparsity model. Then, an iterative sparse recovery algorithm is provided to obtain the recovered sparse vectors composed of sparse coefficients corresponding to both the target subdictionary and the background subdictionary. With the obtained sparse vectors, the residuals between the original test samples and the estimates recovered from the dictionary (including the target subdictionary and the background subdictionary) can be calculated and used to decide which class the test pixels belong to. The proposed algorithm has been applied on real HSIs to test the performance of detecting targets of interest. Experimental results demonstrate that the proposed model achieves better target detection performance than the state-of-the-art methods.