Due to the constrained processing capabilities of real-time detection techniques in remote sensing applications, it is often difficult to obtain detection results with high accuracy in practice. To address this problem, we introduce a new real-time anomaly detection algorithm for hyperspectral images called cloud–edge RX (CE-RX). The algorithm combines the advantages of cloud and edge computing. During the data acquisition process, the edge performs real-time detection on the data just captured to obtain a coarse result and find the suspicious anomalies. At regular intervals, the suspicious anomalies are sent to the cloud for further detection with a highly accurate algorithm, then the cloud sends back the (high-accuracy) results to the edge for information updating. After receiving the results from the cloud, the edge updates the information of the detector in the real-time algorithm to improve the detection accuracy of the next acquired piece of data. Our experimental results demonstrate that the proposed cloud–edge collaborative algorithm can obtain more accurate results than existing real-time detection algorithms.