Hyperspectral anomaly detection (HAD) plays an important role in military and civilian applications and has attracted a lot of research. The well-known Reed–Xiaoli (RX) algorithm is the benchmark of HAD methods. Based on the RX model, many variants have been developed. However, most of them ignore the spatial characteristics of hyperspectral images (HSIs). In this paper, we combine the extended multi-attribute profiles (EMAP) and RX algorithm to propose the Recursive RX with Extended Multi-Attribute Profiles (RRXEMAP) algorithm. Firstly, EMAP is utilized to extract the spatial structure information of HSI. Then, a simple method of background purification is proposed. That is, the background is purified by utilizing the RX detector to remove the pixels that are more likely to be anomalies, which helps improve the ability of background estimation. In addition, a parameter is utilized to control the purification level and can be selected by experiments. Finally, the RX detector is used again between the EMAP feature and the new background distribution to judge the anomaly. Experimental results on six real hyperspectral datasets and a synthetic dataset demonstrate the effectiveness of the proposed RRXEMAP method and the importance of using the EMAP feature and background purity means. Especially, on the abu-airport-2 dataset, the AUC value obtained by the present method is 0.9858, which is higher than the second one, CRD, by 0.0198.