Hyperspectral anomaly detection is used to identify pixels with significant spectral contrast to their surrounding pixels. It plays a valuable role in military and civilian fields due to the characteristic that the priori spectral information is not required. The existing local contrast-based methods usually adopt dual rectangular window scheme for hyperspectral anomaly detection. However, they empirically set the size of dual window, which limits their generalization capability. A hyperspectral anomaly detection method via combining adaptive window saliency detection and improved superpixel segmentation is proposed in this study to address the abovementioned issue. An adversarial autoencoder is first introduced to reduce the dimension of the hyperspectral image for decreasing the computation complexity of the proposed method. Second, the dimension-reduced hyperspectral image is segmented by improved superpixel segmentation. The existing spectral distance measurements used in the superpixel segmentation are effective when the relationship between the spectral value and the intensity of each pixel is linear. However, this condition cannot be guaranteed in practical applications. The improved superpixel segmentation adopts the orthogonal projection divergence to measure the spectral distance for solving the aforementioned problem. Thereafter, an adaptive window-based saliency detection algorithm is proposed and used to obtain the initial detection results. Specifically, the size of the inner window is adaptively determined by the superpixels, which ensures that the pixels belonging to the same inner window are homogeneous. The outer window can be obtained by enlarging the inner window with fixed size. Finally, the domain transform recursive filter and thresholding operation are employed to optimize the initial detection results for reducing the false alarm rate. The comparisons between the orthogonal projection divergence and three common spectral distance measurements (Euclidean distance, spectral angular mapping, and spectral information divergence) in terms of AUC show that the orthogonal projection divergence-based method achieves the highest score on all five datasets. The comparisons between the adaptive window and traditional manual setting dual window in terms of AUC show that the adaptive window-based method achieves the highest score on all five datasets. Comprehensive comparisons between the proposed method and seven state-of-the-art methods on five public datasets are implemented to validate the overall performance of the proposed method. Specifically, the subjective comparisons show that the anomalous pixels detected by the proposed method are more precise and have stronger contrast to background regions. The objective comparisons demonstrate that the proposed method obtains the highest overall detection accuracy and offers the best separability between the anomalous and background pixels. Three conclusions can be derived from this study. First, the improved superpixel segmentation algorithm can enhance the segmentation results, and the proposed adaptive window scheme can increase the performance of saliency detection. Second, the proposed method has excellent detection accuracy, false alarm rate, and separability between the anomalous and background pixels. Finally, the overall performance of the proposed method is superior to that of state-of-the-art methods. © 2023 Science Press. All rights reserved.