The invention belongs to the field of image processing, and relates to a hyperspectral image abnormity detection method based on constrained sparse representation. The method comprises the following steps: (S1), carrying out the linear standardization of a hyperspectral image; (S2), extracting a local background dictionary for each test pixel according to a double-window model; (S3), solving a constrained sparse representation model according to the local background dictionary, and obtaining a first model optimal solution; (S4), deleting all abnormal atoms from the local background dictionaryaccording to the first model optimal solution, and obtaining a new background dictionary; (S5), solving the constrained sparse representation model according to the new background dictionary, and obtaining a second model optimal solution; (S6), calculating a detection value of the pixel according to the second model optimal solution; (S7), traversing the whole hyperspectral image, calculating thedetection values of all pixels of the hyperspectral image, and outputting an image formed by the detection values, i.e., an abnormal detection image. The method does not need the background statistical information and the setting of sparsity, and improves the reconstruction precision.