In recent years, the abnormal data detection has played a vital role in the environmental monitoring of wireless sensor networks (WSNs). However, several key issues in the abnormal data detection still remain to be solved, such as the real time capability of the detection and the classification of the abnormal data. To meet the classification requirements, this paper proposes an abnormal data detection method based on the temporal-spatial correlation in WSNs. Spatial and temporal correlations of the data in WSNs are analyzed in this paper. In addition, abnormal data detection methods of two dimensions are proposed respectively. By Combining the detection results of these two dimensions, the abnormal data can be found and classified accurately. Simulations show that the method proposed in this paper can guarantee both rationality and accuracy for WSNs.