Due to the vague definition of abnormal events and the scarcity of its own samples, the detection of video abnormal events has always been a challenging problem. Existing methods often separate the two steps of video feature extraction and anomaly detection model establishment, it leads to the method that cannot reach the optimum. This paper follows the idea of distance-based anomaly detection, and proposes a one-class neural network method for video anomaly detection. This method combines the layer-by-layer data representation ability of the autoencoder and the one-class classification ability. The features of the hidden layer are constructed for the specific task of anomaly detection, thereby obtaining a hyperplane to separate all normal samples from abnormal samples. The experimental results on two benchmark data sets show that the proposed method achieves 94. 9% frame-level AUC and 94. 5% frame-level AUC on the PED subset and PED2 subset, respectively, and achieves 80 correct event detections on the Subway dataset, confirming the wide applicability of the method in industrial and urban environments.